Function at 0x406e10
Capabilities:
Get file size

Disassembly:
push 0xffffffffffffffff
push 0x412bd6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x288
mov eax, dword [0x4e833c]
push ebx
push esi
mov dword [esp + 0x28c], eax
mov eax, dword [0x4e8e74]
mov ebx, ecx
push edi
mov ecx, 0x4e8e74
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [esp + 0x10], edi
push 0x207
lea ecx, [esp + 0x34]
push ecx
push 0
mov dword [esp + 0x2a8], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
lea edx, [esp + 0x48]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
jne 0x406ec6
call fcn.00405690
mov esi, eax
test esi, esi
jge 0x406ec9
lea eax, [edi - 0x10]
mov dword [esp + 0x29c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406ebf
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, esi
jmp 0x4071ac
mov dword [ebx + 0x34], eax
mov ecx, dword [ebx + 0x34]
push ebp
lea eax, [esp + 0x1c]
lea esi, [ebx + 0x34]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [esp + 0x18], eax
jne 0x406ef2
call fcn.00405690
test eax, eax
jl 0x406ef6
mov eax, dword [esp + 0x18]
mov ebp, eax
jmp 0x406efa
mov ebp, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
test ecx, ecx
mov dword [esp + 0x20], 1
ja 0x406f16
cmp ebp, 0x1f6
jbe 0x40717e
push 0
lea edx, [esp + 0x20]
mov eax, ebp
sub eax, 0x1d2
push edx
push eax
mov dword [esp + 0x24], eax
mov eax, dword [esi]
sbb ecx, 0
push eax
mov dword [esp + 0x2c], ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x406f43
call fcn.00405690
push 0x1d2
lea ecx, [esp + 0x38]
push ecx
mov ecx, esi
call fcn.00405830
cmp dword [esp + 0x34], 0x6f636f50
jne 0x40717e
cmp dword [esp + 0x38], 0x656e695a
jne 0x40717e
mov eax, dword [0x4e8db0]
lea edx, [esp + 0x42]
push edx
push eax
call dword [sym.imp.USER32.dll_SetWindowTextA]
lea ecx, [esp + 0x82]
push ecx
lea ecx, [esp + 0x18]
call fcn.00404660
lea edx, [esp + 0xc2]
push edx
lea ecx, [esp + 0x18]
call fcn.004067c0
mov eax, dword [esp + 0x2a8]
test eax, eax
jne 0x406fb8
push 0x80070057
call fcn.004014c0
mov eax, dword [0x4e8e74]
push 1
push 0xe
mov ecx, 0x4e8e74
call dword [eax]
test eax, eax
jne 0x406fd1
call fcn.004015f0
mov ecx, dword [eax + 8]
lea edi, [eax + 0x10]
mov eax, 0xe
cmp ecx, eax
mov dword [esp + 0x18], edi
jge 0x406fee
push 0x80070057
call fcn.004014c0
mov dword [edi - 0xc], eax
mov eax, dword [esp + 0x2a8]
mov byte [edi + 0xe], 0
mov edx, dword [eax]
mov ecx, edi
mov dword [ecx], edx
mov edx, dword [eax + 4]
mov dword [ecx + 4], edx
mov edx, dword [eax + 8]
mov dword [ecx + 8], edx
mov ax, word [eax + 0xc]
mov word [ecx + 0xc], ax
mov eax, dword [edi - 0xc]
push eax
push edi
lea ecx, [esp + 0x1c]
mov byte [esp + 0x2a8], 1
call fcn.00406320
add edi, 0xfffffff0
mov byte [esp + 0x2a0], 0
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40704e
mov ecx, dword [edi]
mov eax, dword [ecx]
push edi
call dword [eax + 4]
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx - 0xc]
push 1
lea edx, [ebx + 0x3c]
push edx
push eax
push ecx
lea ecx, [esp + 0x24c]
call fcn.00405a20
movsx ecx, byte [esp + 0x3c]
mov eax, dword [esp + 0x3d]
mov edx, dword [esp + 0x41]
call fcn.0040b760
push 0
sub ebp, eax
push 0
sub ebp, 0x1d2
push ebp
mov ecx, esi
mov dword [esp + 0x49], eax
mov dword [esp + 0x4d], edx
mov edi, eax
call fcn.00405880
push 0x24
lea eax, [esp + 0x38]
push eax
mov ecx, esi
call fcn.00405830
movzx eax, byte [esp + 0x4b]
dec eax
xor ecx, ecx
nop
sub byte [esp + ecx + 0x34], al
inc ecx
cmp ecx, 0x17
jl 0x4070b0
push 0x17
lea ecx, [esp + 0x38]
push str.MagaZine_Media_v2.0
push ecx
call fcn.0040b720
add esp, 0xc
test eax, eax
jne 0x40717e
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x40717e
cmp edi, eax
jbe 0x40717e
mov dl, byte [esp + 0x4b]
mov cx, word [esp + 0x56]
mov byte [esp + 0x13], dl
mov edx, dword [esp + 0x50]
push 0
mov dword [esp + 0x24], eax
mov ax, word [esp + 0x58]
add edx, ebp
push 0
mov word [ebx + 0x4e], cx
push edx
mov ecx, esi
mov word [ebx + 0x4c], ax
call fcn.00405880
push 0x103
lea eax, [esp + 0x38]
push eax
mov ecx, esi
call fcn.00405830
movzx edi, byte [esp + 0x13]
mov edx, edi
lea eax, [esp + 0x34]
call fcn.00404d10
mov ecx, eax
push ecx
lea ecx, [ebx + 0x38]
call fcn.00404660
mov edx, dword [esp + 0x20]
push 0
add edx, ebp
push 0
push edx
mov ecx, esi
call fcn.00405880
push 0x10
lea eax, [esp + 0x28]
push eax
mov ecx, esi
call fcn.00405830
mov ecx, dword [esp + 0x28]
push edi
push ebp
push ecx
push 0
mov ecx, ebx
call fcn.00406c50
mov dword [esp + 0x20], 0
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov dword [esp + 0x2a0], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4071a7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x20]
pop ebp
mov ecx, dword [esp + 0x294]
pop edi
pop esi
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x288]
pop ebx
call fcn.0040ac43
add esp, 0x294
ret 4