Function at 0x40394f
Capabilities:
Get file size

Disassembly:
sub esp, 0x228
push ebx
push ebp
push esi
xor ebx, ebx
xor ebp, ebp
push edi
mov dword [esp + 0x10], ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0x2000
mov edi, 0x4dc000
add eax, 0x3e8
push edi
push ebp
mov dword [0x46f560], eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 3
push 0x80000000
push edi
call fcn.004072ca
mov esi, eax
mov dword [0x40c010], esi
cmp esi, 0xffffffff
jne 0x4039a7
mov eax, 0x409cdc
jmp 0x403b71
push edi
mov edi, 0x4cc000
push edi
call fcn.004074c9
push edi
call fcn.004076be
push eax
push 0x4e0000
call fcn.004074c9
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
mov dword [0x420160], esi
test esi, esi
je 0x403acf
mov ebx, dword [esp + 0x23c]
cmp dword [0x46f568], 0
mov eax, 0x8000
mov edi, 0x200
cmovne edi, eax
cmp esi, edi
cmovb edi, esi
push edi
push 0x4201f8
call fcn.004035db
test eax, eax
je 0x403b64
cmp dword [0x46f568], 0
jne 0x403a95
push 0x1c
push 0x4201f8
lea eax, [esp + 0x1c]
push eax
call fcn.00407009
test dword [esp + 0x14], 0xfffffff0
jne 0x403aa2
cmp dword [esp + 0x18], 0xdeadbeef
jne 0x403aa2
cmp dword [esp + 0x24], 0x74736e49
jne 0x403aa2
cmp dword [esp + 0x20], 0x74666f73
jne 0x403aa2
cmp dword [esp + 0x1c], 0x6c6c754e
jne 0x403aa2
mov eax, dword [0x420164]
or ebx, dword [esp + 0x14]
mov ecx, dword [esp + 0x2c]
mov dword [0x46f568], eax
mov eax, ebx
and eax, 2
or dword [0x46f640], eax
cmp ecx, esi
ja 0x403b6c
mov eax, ebx
and al, 0xc
cmp al, 4
je 0x403acb
lea esi, [ecx - 4]
inc ebp
cmp edi, esi
jbe 0x403aa2
mov edi, esi
jmp 0x403aa2
test bl, 2
jne 0x403aa2
push 0
call fcn.004038a9
pop ecx
cmp esi, dword [0x420160]
jae 0x403abd
push edi
push 0x4201f8
push dword [esp + 0x18]
call fcn.004077e8
mov dword [esp + 0x10], eax
add dword [0x420164], edi
sub esi, edi
jne 0x4039e4
mov ebx, dword [esp + 0x10]
push 1
call fcn.004038a9
cmp dword [0x46f568], 0
pop ecx
je 0x403b6c
test ebp, ebp
je 0x403b0f
push dword [0x420164]
call fcn.004035f1
push 4
lea eax, [esp + 0x14]
push eax
push dword [0x40c010]
call fcn.004072f7
test eax, eax
je 0x403b6c
cmp ebx, dword [esp + 0x10]
jne 0x403b6c
push dword [esp + 0x28]
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ecx, 0x420170
mov esi, eax
call fcn.00408638
push 0x4d4000
lea eax, [esp + 0x34]
push eax
call fcn.00407405
push 0
push 0x4000100
push 2
push 0
push 0
push 0xc0000000
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [0x40c014], eax
cmp eax, 0xffffffff
jne 0x403b7e
mov eax, 0x409da0
jmp 0x403b71
push 1
call fcn.004038a9
pop ecx
mov eax, 0x409cf0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x228
ret 4
mov eax, dword [0x46f568]
add eax, 0x1c
push eax
call fcn.004035f1
mov ecx, dword [esp + 0x14]
push dword [esp + 0x28]
not ecx
mov dword [0x420158], eax
and ecx, 4
sub eax, ecx
mov ecx, dword [esp + 0x30]
push esi
add ecx, 0xffffffe4
push 0
add eax, ecx
push 0xffffffffffffffff
mov dword [0x42015c], eax
call fcn.00403787
cmp eax, dword [esp + 0x28]
jne 0x403b6c
test byte [esp + 0x14], 1
mov dword [0x46f570], esi
mov eax, dword [esi]
mov dword [0x46f56c], eax
je 0x403bd8
inc dword [0x46f564]
push 8
pop ecx
lea eax, [esi + 0x44]
lea eax, [eax - 8]
add dword [eax], esi
sub ecx, 1
jne 0x403bde
mov eax, dword [0x420154]
mov dword [esi + 0x3c], eax
lea eax, [esi + 4]
push 0x40
push eax
push 0x46f580
call fcn.00407009
xor eax, eax
jmp 0x403b71