Function at 0x4038c0
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x270
mov eax, dword [0x41c050]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [ebp - 0x25c], eax
mov eax, dword [ebp + 0xc]
push 0x128
mov dword [ebp - 0x268], eax
xor ebx, ebx
lea eax, [ebp - 0x23c]
push ebx
push eax
call fcn.0040b7d0
add esp, 0xc
lea esi, [ebp - 0x114]
call fcn.0040305f
xor edi, edi
mov esi, eax
inc edi
cmp esi, edi
jne 0x403be9
push ebx
push 0x80
push 3
push ebx
push edi
push 0xc0000000
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov dword [ebp - 0x260], eax
mov esi, ecx
cmp esi, edi
jne 0x403bd4
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov dword [ebp - 0x254], eax
mov esi, ecx
cmp esi, edi
jne 0x403bd4
push ebx
push eax
push ebx
push 4
push ebx
push dword [ebp - 0x260]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
xor ecx, ecx
cmp eax, ebx
setne cl
mov dword [ebp - 0x264], eax
mov esi, ecx
cmp esi, edi
jne 0x403bc0
push dword [ebp - 0x254]
push ebx
push ebx
push 0xf001f
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
xor ecx, ecx
cmp eax, ebx
setne cl
mov dword [ebp - 0x250], eax
mov esi, ecx
cmp esi, edi
jne 0x403bac
push dword [ebp - 0x254]
mov dword [ebp - 0x240], ebx
push eax
push dword [ebp - 0x25c]
mov dword [ebp - 0x248], ebx
call fcn.00403c15
mov esi, eax
add esp, 0xc
cmp esi, ebx
jbe 0x403a03
xor ecx, ecx
push 4
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040a769
pop ecx
mov dword [ebp - 0x240], eax
jmp 0x403a09
mov dword [ebp - 0x248], edi
cmp dword [ebp - 0x240], ebx
je 0x403b4b
mov eax, esi
shl eax, 2
push eax
push ebx
push dword [ebp - 0x240]
mov dword [ebp - 0x24c], ebx
mov dword [ebp - 0x244], ebx
mov dword [ebp - 0x258], ebx
call fcn.0040b7d0
lea eax, [ebp - 0x244]
push eax
push dword [ebp - 0x254]
lea edi, [ebp - 0x24c]
push dword [ebp - 0x250]
push dword [ebp - 0x25c]
call fcn.00403c63
add esp, 0x1c
jmp 0x403aa3
cmp edi, esi
jae 0x403aad
mov eax, dword [ebp - 0x244]
mov ecx, dword [ebp - 0x240]
mov dword [ecx + edi*4], eax
lea eax, [ebp - 0x244]
push eax
push dword [ebp - 0x254]
inc edi
push dword [ebp - 0x250]
mov dword [ebp - 0x258], edi
push dword [ebp - 0x25c]
lea edi, [ebp - 0x24c]
call fcn.00403c63
add esp, 0x10
mov edi, dword [ebp - 0x258]
test eax, eax
jne 0x403a62
cmp edi, ebx
jbe 0x403b30
mov edx, dword [ebp - 0x240]
mov dword [ebp - 0x244], 1
mov dword [ebp - 0x24c], edi
mov esi, dword [ebp - 0x244]
cmp esi, edi
jae 0x403af5
mov eax, dword [ebp - 0x240]
mov ecx, dword [edx]
lea edi, [eax + esi*4]
mov eax, dword [edi]
cmp eax, ecx
jae 0x403ae6
mov dword [edi], ecx
mov dword [edx], eax
inc esi
cmp esi, dword [ebp - 0x258]
jb 0x403ad1
mov edi, dword [ebp - 0x258]
inc dword [ebp - 0x244]
add edx, 4
dec dword [ebp - 0x24c]
jne 0x403ac7
cmp edi, ebx
jbe 0x403b30
mov ecx, dword [ebp - 0x240]
xor eax, eax
inc eax
cmp dword [ebp - 0x248], ebx
jne 0x403b3f
cmp eax, dword [ecx]
jae 0x403b25
mov dword [ebp - 0x248], eax
add ecx, 4
inc eax
lea edx, [eax - 1]
cmp edx, edi
jb 0x403b13
cmp dword [ebp - 0x248], ebx
jne 0x403b3f
inc edi
mov dword [ebp - 0x248], edi
push dword [ebp - 0x240]
call fcn.0040a6f4
pop ecx
push dword [ebp - 0x25c]
lea eax, [ebp - 0x234]
push eax
mov dword [ebp - 0x23c], 0x128
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [ebp - 0x248]
push dword [ebp - 0x254]
mov dword [ebp - 0x134], eax
mov eax, dword [ebp - 0x268]
push dword [ebp - 0x250]
mov dword [ebp - 0x118], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x130], eax
lea eax, [ebp - 0x23c]
push eax
mov dword [ebp - 0x238], ebx
call fcn.00403537
add esp, 0xc
mov esi, eax
cmp dword [ebp - 0x250], ebx
je 0x403bc0
push dword [ebp - 0x250]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp dword [ebp - 0x264], ebx
je 0x403bd4
push dword [ebp - 0x264]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x260], 0xffffffff
je 0x403be9
push dword [ebp - 0x260]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, ebx
jne 0x403bfc
lea edi, [ebp - 0x23c]
call fcn.00403116
cmp eax, ebx
je 0x403c04
mov eax, dword [ebp - 0x134]
jmp 0x403c06
mov eax, ebx
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040a6e5
leave
ret