Function at 0x406bd0
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x423e3d
mov eax, dword fs:[0]
push eax
sub esp, 0x12c
mov eax, dword [0x431078]
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.00406930
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 0x80000000
push dword [ebp - 0x124]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x406c53
call fcn.00405e20
jmp 0x406c5d
mov edi, eax
xor eax, eax
mov dword [ebp - 0x130], edi
mov byte [ebp - 4], 1
test eax, eax
jns 0x406c87
call fcn.00403eb0
mov ecx, eax
test ecx, ecx
je 0x40703e
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebx], eax
mov byte [ebp - 4], 3
jmp 0x406e15
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 0x406cdd
call fcn.00405e20
test eax, eax
jns 0x406cd1
call fcn.00403eb0
mov ecx, eax
test ecx, ecx
je 0x40703e
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebx], eax
mov byte [ebp - 4], 4
jmp 0x406e15
mov eax, dword [ebp - 0x138]
mov dword [ebp - 0x120], eax
mov byte [ebp - 0x115], 0
cmp eax, 2
jl 0x406d56
test al, 1
jne 0x406d9e
push 2
lea eax, [ebp - 0x11c]
push eax
lea ecx, [ebp - 0x130]
call fcn.00407640
test eax, eax
jns 0x406d30
push 0x425848
mov ecx, ebx
call fcn.00406290
test edi, edi
je 0x406d20
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x124]
call fcn.00402020
jmp 0x406e63
mov ax, word [ebp - 0x11c]
cmp al, 0xff
jne 0x406d6e
cmp ah, 0xfe
jne 0x406d6e
mov eax, dword [ebp - 0x120]
add eax, 0xfffffffe
mov byte [ebp - 0x115], 1
mov dword [ebp - 0x120], eax
test eax, eax
jne 0x406d9e
call fcn.00403eb0
mov ecx, eax
test ecx, ecx
je 0x40703e
jmp 0x406e07
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 0x406d9e
call fcn.00405e20
lea ecx, [ebp - 0x11c]
call fcn.00401c80
cmp byte [ebp - 0x115], 0
mov byte [ebp - 4], 6
je 0x406e97
mov esi, dword [ebp - 0x120]
lea ecx, [ebp - 0x11c]
mov eax, esi
shr eax, 1
push eax
mov dword [ebp - 0x128], eax
call fcn.004068f0
push esi
push eax
lea ecx, [ebp - 0x130]
call fcn.00407640
test eax, eax
jns 0x406e81
push 0x425848
mov ecx, ebx
call fcn.00406290
lea ecx, [ebp - 0x11c]
call fcn.00402020
jmp 0x406d15
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebx], eax
mov byte [ebp - 4], 5
mov eax, 0x425848
mov ecx, ebx
test eax, 0xffff0000
jne 0x406e2e
movzx eax, ax
push eax
call fcn.00403fe0
jmp 0x406e3a
push 0
push 0x425848
call fcn.00405390
test edi, edi
je 0x406e45
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 0x406e63
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.0041345d
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x128]
lea ecx, [ebp - 0x11c]
call fcn.004076d0
jmp 0x406fe5
mov byte [ebp - 4], 7
call fcn.00403eb0
mov ecx, eax
test ecx, ecx
je 0x407048
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 0x407034
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edx
or eax, ecx
jge 0x406ef3
push edx
lea ecx, [ebp - 0x128]
call fcn.004075e0
mov esi, dword [ebp - 0x128]
mov edx, dword [ebp - 0x120]
push edx
push esi
lea ecx, [ebp - 0x130]
call fcn.00407640
test eax, eax
jns 0x406f3c
push 0x425848
mov ecx, ebx
call fcn.00406290
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x406df7
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x11c]
call fcn.00402020
jmp 0x406d15
mov eax, dword [ebp - 0x120]
cmp eax, dword [esi - 8]
jg 0x407034
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.00406a70
mov edx, dword [ebp - 0x114]
mov byte [ebp - 4], 9
test edx, edx
jne 0x406f7e
xor ecx, ecx
jmp 0x406fa3
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 0x406f90
sub ecx, dword [ebp - 0x120]
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x11c]
call fcn.00405390
mov eax, dword [ebp - 0x114]
lea ecx, [ebp - 0x110]
cmp eax, ecx
je 0x406fc9
push eax
call fcn.004167ca
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 0x406fe5
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.00401bc0
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 0x407013
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test edi, edi
je 0x40701e
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 0x406e59
push 0x80070057
call fcn.00402f20
push 0x80004005
call fcn.00402f20
push 0x80004005
call fcn.00402f20
int3