Function at 0x407c40
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x425bdd
mov eax, dword fs:[0]
push eax
sub esp, 0x12c
mov eax, dword [0x433074]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x124]
push eax
mov dword [ebp - 0x128], ebx
call fcn.004079a0
add esp, 4
xor edi, edi
mov dword [ebp - 4], 0
mov dword [ebp - 0x130], edi
mov dword [ebp - 0x12c], edi
push edi
push pe_nt_image_headers32
push 3
push edi
push 1
push SysReAllocString
push dword [ebp - 0x124]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x407cc3
call fcn.00406e90
jmp 0x407ccd
mov edi, eax
xor eax, eax
mov dword [ebp - 0x130], edi
mov byte [ebp - 4], 1
test eax, eax
jns 0x407cf7
call fcn.00404d30
mov ecx, eax
test ecx, ecx
je 0x4080ae
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebx], eax
mov byte [ebp - 4], 3
jmp 0x407e85
lea eax, [ebp - 0x134]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x120], eax
mov dword [ebp - 0x138], eax
cmp eax, 0xffffffff
jne 0x407d4d
call fcn.00406e90
test eax, eax
jns 0x407d41
call fcn.00404d30
mov ecx, eax
test ecx, ecx
je 0x4080ae
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebx], eax
mov byte [ebp - 4], 4
jmp 0x407e85
mov eax, dword [ebp - 0x138]
mov dword [ebp - 0x120], eax
mov byte [ebp - 0x115], 0
cmp eax, 2
jl 0x407dc6
test al, 1
jne 0x407e0e
push 2
lea eax, [ebp - 0x11c]
push eax
lea ecx, [ebp - 0x130]
call fcn.004086b0
test eax, eax
jns 0x407da0
push 0x427944
mov ecx, ebx
call fcn.00407300
test edi, edi
je 0x407d90
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x124]
call fcn.00402ed0
jmp 0x407ed3
mov ax, word [ebp - 0x11c]
cmp al, 0xff
jne 0x407dde
cmp ah, 0xfe
jne 0x407dde
mov eax, dword [ebp - 0x120]
add eax, 0xfffffffe
mov byte [ebp - 0x115], 1
mov dword [ebp - 0x120], eax
test eax, eax
jne 0x407e0e
call fcn.00404d30
mov ecx, eax
test ecx, ecx
je 0x4080ae
jmp 0x407e77
push 0
lea eax, [ebp - 0x134]
mov dword [ebp - 0x138], 0
push eax
push 0
push edi
mov dword [ebp - 0x134], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x407e0e
call fcn.00406e90
lea ecx, [ebp - 0x11c]
call fcn.00402d70
cmp byte [ebp - 0x115], 0
mov byte [ebp - 4], 6
je 0x407f07
mov esi, dword [ebp - 0x120]
lea ecx, [ebp - 0x11c]
mov eax, esi
shr eax, 1
push eax
mov dword [ebp - 0x128], eax
call fcn.00407960
push esi
push eax
lea ecx, [ebp - 0x130]
call fcn.004086b0
test eax, eax
jns 0x407ef1
push 0x427944
mov ecx, ebx
call fcn.00407300
lea ecx, [ebp - 0x11c]
call fcn.00402ed0
jmp 0x407d85
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebx], eax
mov byte [ebp - 4], 5
mov eax, 0x427944
mov ecx, ebx
test eax, 0xffff0000
jne 0x407e9e
movzx eax, ax
push eax
call fcn.00404ff0
jmp 0x407eaa
push 0
push 0x427944
call fcn.00406400
test edi, edi
je 0x407eb5
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x124]
or eax, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x407ed3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00414c7c
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x128]
lea ecx, [ebp - 0x11c]
call fcn.00408740
jmp 0x408055
mov byte [ebp - 4], 7
call fcn.00404d30
mov ecx, eax
test ecx, ecx
je 0x4080b8
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x128], esi
mov edx, dword [ebp - 0x120]
mov byte [ebp - 4], 8
test edx, edx
js 0x4080a4
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edx
or eax, ecx
jge 0x407f63
push edx
lea ecx, [ebp - 0x128]
call fcn.00408650
mov esi, dword [ebp - 0x128]
mov edx, dword [ebp - 0x120]
push edx
push esi
lea ecx, [ebp - 0x130]
call fcn.004086b0
test eax, eax
jns 0x407fac
push 0x427944
mov ecx, ebx
call fcn.00407300
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x407e67
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x11c]
call fcn.00402ed0
jmp 0x407d85
mov eax, dword [ebp - 0x120]
cmp eax, dword [esi - 8]
jg 0x4080a4
mov dword [esi - 0xc], eax
lea ecx, [ebp - 0x114]
mov byte [eax + esi], 0
lea eax, [ebp - 0x110]
push 0
push esi
mov dword [ebp - 0x114], eax
call fcn.00407ae0
mov edx, dword [ebp - 0x114]
mov byte [ebp - 4], 9
test edx, edx
jne 0x407fee
xor ecx, ecx
jmp 0x408013
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x120], eax
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x408000
sub ecx, dword [ebp - 0x120]
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x11c]
call fcn.00406400
mov eax, dword [ebp - 0x114]
lea ecx, [ebp - 0x110]
cmp eax, ecx
je 0x408039
push eax
call fcn.0041841d
add esp, 4
mov byte [ebp - 4], 6
lea edx, [esi - 0x10]
or eax, 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x408055
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp - 0x11c]
mov ecx, ebx
push eax
call fcn.00402cb0
mov edx, dword [ebp - 0x11c]
or esi, 0xffffffff
add edx, 0xfffffff0
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x408083
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test edi, edi
je 0x40808e
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x124]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jmp 0x407ec9
push 0x80070057
call fcn.00402060
push 0x80004005
call fcn.00402060
push 0x80004005
call fcn.00402060
int3