Function at 0x4394be
Capabilities:
Get file size

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x4c4
mov eax, dword [0x475280]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
mov dword [ebp - 0x49c], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x448], eax
mov esi, ebx
mov eax, dword [ebp + 0x1c]
push 0x400
mov dword [ebp - 0x4b0], eax
lea eax, [ebp - 0x408]
push ebx
push eax
mov dword [ebp - 0x4a8], edx
mov dword [ebp - 0x454], ecx
mov dword [ebp - 0x430], ebx
mov dword [ebp - 0x480], ebx
mov dword [ebp - 0x458], ebx
mov dword [ebp - 0x45c], ebx
mov dword [ebp - 0x410], ebx
mov dword [ebp - 0x40c], ebx
mov dword [ebp - 0x44c], ebx
mov dword [ebp - 0x450], ebx
mov dword [ebp - 0x440], ebx
mov dword [ebp - 0x43c], ebx
mov dword [ebp - 0x428], ebx
mov dword [ebp - 0x438], ebx
mov dword [ebp - 0x420], ebx
mov dword [ebp - 0x414], ebx
mov dword [ebp - 0x460], 4
call sub.msvcrt.dll_memset
xor eax, eax
mov dword [ebp - 0x41c], ebx
lea edi, [ebp - 0x4c4]
add esp, 0xc
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
lea edi, [ebp - 0x498]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
mov edi, dword [ebp - 0x454]
mov dword [ebp - 0x484], eax
mov dword [ebp - 0x444], eax
test edi, edi
je 0x439b8c
mov eax, dword [ebp - 0x49c]
cmp eax, 0xffffffff
je 0x439b8c
cmp dword [ebp - 0x448], 0xffffffff
je 0x439b8c
lea ecx, [ebp - 0x440]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x439b8c
mov eax, dword [ebp - 0x440]
or eax, dword [ebp - 0x43c]
je 0x439b8c
xor eax, eax
lea edx, [ebp - 0x484]
lea eax, [ebp - 0x444]
mov ecx, edi
push eax
call fcn.004303dc
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x438]
push eax
lea eax, [ebp - 0x420]
push eax
lea edx, [ebp - 0x428]
call fcn.0043040c
test eax, eax
jne 0x43963a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x41c], eax
cmp dword [ebp - 0x428], ebx
je 0x439b7b
cmp dword [ebp - 0x438], ebx
je 0x439b7b
mov eax, dword [ebp - 0x420]
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x424], eax
cmp eax, edi
jb 0x439b7b
cmp dword [ebp - 0x414], edi
jb 0x439b7b
mov esi, dword [ebp - 0x454]
mov ecx, esi
call fcn.0042ffc8
cmp eax, 1
je 0x439693
mov ecx, esi
call fcn.0042ffc8
cmp eax, 7
jne 0x439699
mov dword [ebp - 0x424], edi
mov esi, dword [ebp - 0x43c]
mov ecx, edi
mov edi, dword [ebp - 0x440]
add ecx, edi
push 0
pop edx
mov eax, edx
mov dword [ebp - 0x418], esi
adc eax, esi
sub ecx, 1
push edx
push dword [ebp + 0x10]
sbb eax, edx
push eax
push ecx
call fcn.00473010
lea ecx, [eax - 1]
test esi, esi
je 0x4396d8
push 8
pop eax
mov dword [ebp - 0x460], eax
jmp 0x4396de
mov eax, dword [ebp - 0x460]
test ecx, ecx
je 0x43979d
mul ecx
xor ebx, ebx
mov edi, eax
mov esi, ebx
mov dword [ebp - 0x480], edi
cmp edx, ebx
ja 0x439793
jb 0x439707
cmp edi, 0xffffffff
ja 0x439793
cmp edi, ecx
jbe 0x439b7b
cmp edi, 0x400
ja 0x43971f
lea ebx, [ebp - 0x408]
jmp 0x439738
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x439b7b
mov eax, dword [ebp - 0x444]
mov edx, ebx
mov ecx, dword [ebp - 0x448]
mov dword [ebp - 0x488], eax
lea eax, [ebp - 0x498]
push 1
push eax
push edi
call fcn.0042a5c1
xor edx, edx
test eax, eax
je 0x439b5e
mov ecx, edx
mov dword [ebp - 0x458], edi
mov dword [ebp - 0x45c], ecx
mov dword [ebp - 0x450], ecx
mov ecx, dword [ebp - 0x43c]
mov dword [ebp - 0x44c], edi
mov edi, dword [ebp - 0x440]
mov dword [ebp - 0x418], ecx
jmp 0x4397a5
mov eax, 0x216
jmp 0x439b85
mov ecx, dword [ebp - 0x418]
xor edx, edx
mov eax, dword [ebp - 0x458]
xor esi, esi
mov dword [ebp - 0x478], eax
inc esi
mov eax, dword [ebp - 0x45c]
mov dword [ebp - 0x420], eax
jmp 0x4397c4
xor edx, edx
mov eax, edi
or eax, ecx
je 0x439bbd
cmp edx, ecx
jl 0x4397e2
jg 0x4397dc
cmp dword [ebp - 0x424], edi
jbe 0x4397e2
mov dword [ebp - 0x424], edi
mov ecx, dword [ebp - 0x410]
mov eax, ecx
mov edx, dword [ebp - 0x40c]
or eax, edx
je 0x43984c
xor eax, eax
push eax
push 0xa00000
push edx
push ecx
call fcn.00473100
test eax, eax
jne 0x439840
cmp edx, eax
jne 0x439832
push ecx
mov ecx, dword [ebp - 0x454]
mov edx, 0x948e
push eax
push eax
call fcn.00429ea7
cmp eax, 0xffffffff
jne 0x439840
push 0x4d3
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
mov esi, eax
mov ecx, dword [ebp - 0x410]
mov edx, dword [ebp - 0x40c]
jmp 0x43984e
mov edx, dword [ebp - 0x40c]
mov ecx, dword [ebp - 0x410]
xor eax, eax
test esi, esi
je 0x439bad
mov dword [ebp - 0x4c4], eax
xor esi, esi
mov dword [ebp - 0x4c0], eax
mov eax, dword [ebp - 0x484]
mov dword [ebp - 0x4b4], eax
lea eax, [ebp - 0x4c4]
push esi
push eax
push dword [ebp - 0x424]
mov dword [ebp - 0x4bc], ecx
mov ecx, dword [ebp - 0x49c]
mov dword [ebp - 0x4b8], edx
mov edx, dword [ebp - 0x428]
call fcn.0042a5c1
test eax, eax
je 0x439bad
mov edx, dword [ebp - 0x424]
mov eax, esi
mov ecx, edx
mov dword [ebp - 0x434], eax
sub edi, ecx
mov dword [ebp - 0x42c], esi
mov dword [ebp - 0x47c], edx
sbb dword [ebp - 0x418], eax
add dword [ebp - 0x410], ecx
mov dword [ebp - 0x4a0], ecx
adc dword [ebp - 0x40c], eax
mov dword [ebp - 0x4ac], edi
jmp 0x439ac2
mov ecx, dword [ebp + 0x10]
mov edi, edx
cmp edx, ecx
jb 0x4398ef
mov edi, ecx
xor edx, edx
mov dword [ebp - 0x474], edx
cmp dword [ebp + 0x18], edx
je 0x4399c3
ret
add byte [eax], al
invalid
mov ecx, eax
xor eax, eax
sub ecx, dword [ebp - 0x4a0]
sbb eax, edx
add ecx, dword [ebp - 0x410]
mov edx, edi
mov dword [ebp - 0x4a4], ecx
adc eax, dword [ebp - 0x40c]
and dword [ebp - 0x414], 0
add edx, ecx
mov dword [ebp - 0x464], eax
adc dword [ebp - 0x414], eax
xor eax, eax
mov dword [ebp - 0x468], edx
mov dword [ebp - 0x470], eax
cmp dword [ebp + 0x18], eax
jbe 0x4399c3
mov edx, dword [ebp + 0x14]
mov esi, dword [edx + 4]
mov eax, dword [edx]
mov dword [ebp - 0x46c], eax
cmp dword [ebp - 0x464], esi
jb 0x439970
ja 0x439964
cmp ecx, eax
jbe 0x439970
mov esi, dword [ebp - 0x464]
mov dword [ebp - 0x46c], ecx
mov eax, dword [edx + 0xc]
mov ecx, dword [edx + 8]
cmp dword [ebp - 0x414], eax
ja 0x439994
jb 0x439988
cmp dword [ebp - 0x468], ecx
jae 0x439994
mov ecx, dword [ebp - 0x468]
mov eax, dword [ebp - 0x414]
cmp esi, eax
jb 0x4399fa
ja 0x4399a2
cmp dword [ebp - 0x46c], ecx
jb 0x4399fa
mov eax, dword [ebp - 0x470]
add edx, 0x10
mov ecx, dword [ebp - 0x4a4]
inc eax
mov dword [ebp - 0x470], eax
cmp eax, dword [ebp + 0x18]
jb 0x43994b
mov esi, dword [ebp - 0x42c]
lea eax, [ebp - 0x474]
push eax
mov eax, dword [ebp - 0x438]
add eax, esi
push edi
push eax
mov eax, dword [ebp - 0x434]
add eax, dword [ebp - 0x428]
push edi
push eax
mov eax, dword [ebp - 0x4a8]
push eax
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x47744c]
call esi
test eax, eax
jne 0x439a23
mov eax, dword [ebp - 0x434]
add eax, dword [ebp - 0x428]
mov esi, dword [ebp - 0x42c]
push edi
push eax
mov eax, dword [ebp - 0x438]
add eax, esi
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov eax, edi
jmp 0x439a2f
mov eax, dword [ebp - 0x474]
mov esi, dword [ebp - 0x42c]
add dword [ebp - 0x434], edi
add esi, eax
mov ecx, dword [ebp - 0x478]
mov edx, dword [ebp - 0x47c]
add ecx, eax
push 0
pop eax
adc dword [ebp - 0x420], eax
sub edx, edi
mov edi, dword [ebp - 0x4ac]
mov eax, edi
or eax, dword [ebp - 0x418]
mov dword [ebp - 0x42c], esi
mov dword [ebp - 0x478], ecx
mov dword [ebp - 0x47c], edx
jne 0x439a76
test edx, edx
je 0x439abc
mov eax, ecx
mov ecx, dword [ebp - 0x420]
sub eax, dword [ebp - 0x458]
sbb ecx, dword [ebp - 0x45c]
cmp dword [ebp - 0x460], 4
jne 0x439aa0
mov ecx, dword [ebp - 0x430]
mov dword [ebx + ecx*4], eax
mov eax, ecx
jmp 0x439ab5
mov esi, dword [ebp - 0x430]
mov dword [ebx + esi*8], eax
mov eax, esi
mov esi, dword [ebp - 0x42c]
mov dword [ebx + eax*8 + 4], ecx
inc eax
mov dword [ebp - 0x430], eax
mov eax, dword [ebp - 0x434]
test edx, edx
jne 0x4398e4
mov edx, dword [ebp - 0x444]
xor eax, eax
mov ecx, dword [ebp - 0x450]
mov dword [ebp - 0x498], eax
mov dword [ebp - 0x494], eax
mov eax, dword [ebp - 0x44c]
mov dword [ebp - 0x490], eax
add eax, esi
push 0
mov dword [ebp - 0x488], edx
pop edx
mov dword [ebp - 0x48c], ecx
adc ecx, edx
mov dword [ebp - 0x44c], eax
mov dword [ebp - 0x450], ecx
cmp ecx, dword [ebp - 0x43c]
jg 0x439b9f
jl 0x439b25
cmp eax, dword [ebp - 0x440]
ja 0x439b9f
mov edx, dword [ebp - 0x438]
lea eax, [ebp - 0x498]
mov ecx, dword [ebp - 0x448]
push 1
push eax
push esi
call fcn.0042a5c1
mov ecx, dword [ebp - 0x418]
mov esi, eax
test esi, esi
jne 0x4397c2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x41c], eax
xor edx, edx
test ebx, ebx
je 0x439b7b
lea eax, [ebp - 0x408]
cmp ebx, eax
je 0x439b7b
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 0x41c]
test eax, eax
je 0x439b8c
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00471d10
leave
ret 0x20
mov dword [ebp - 0x41c], 0xdf
mov esi, edx
jmp 0x439b5e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x41c], eax
xor edx, edx
jmp 0x439ba9
test esi, esi
je 0x439b5c
test ebx, ebx
je 0x439c17
mov eax, dword [ebp - 0x444]
mov ecx, dword [ebp - 0x448]
mov dword [ebp - 0x488], eax
lea eax, [ebp - 0x498]
push 1
push eax
push dword [ebp - 0x480]
mov dword [ebp - 0x498], edx
mov dword [ebp - 0x494], edx
mov dword [ebp - 0x490], edx
mov dword [ebp - 0x48c], edx
mov edx, ebx
call fcn.0042a5c1
mov esi, eax
test esi, esi
jne 0x439c1f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x41c], eax
test esi, esi
je 0x439b5c
mov ecx, dword [ebp - 0x4b0]
xor edx, edx
test ecx, ecx
je 0x439b5e
mov eax, dword [ebp - 0x44c]
mov dword [ecx], eax
mov eax, dword [ebp - 0x450]
mov dword [ecx + 4], eax
jmp 0x439b5e