Function at 0x10006400
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x498
push ebx
push esi
push edi
mov dword [ebp - 0x488], ecx
push eax
xor eax, eax
xor eax, eax
xor eax, eax
xor eax, eax
je 0x10006424
sub al, 0x2d
pop eax
pop eax
mov eax, dword [ebp + 8]
push eax
push 0x1f48
mov ecx, dword [ebp - 0x488]
add ecx, 4
call fcn.10004b00
test eax, eax
jne 0x10006445
jmp 0x100069ff
mov ecx, 1
test ecx, ecx
je 0x100069f1
mov dword [ebp - 0x428], 0
mov ecx, 0x109
xor eax, eax
lea edi, [ebp - 0x424]
rep stosd dword es:[edi], eax
mov dword [ebp - 0x42c], 0x428
push 0
lea edx, [ebp - 0x42c]
push edx
lea eax, [ebp - 0x428]
push eax
push 0
push 0
mov ecx, dword [ebp - 0x488]
add ecx, 4
call fcn.10004d00
test eax, eax
jne 0x100064a0
jmp 0x100069f1
cmp dword [ebp - 0x424], 0
jne 0x1000678d
push 0
push 0x80
push 3
push 0
push 1
push bind
lea ecx, [ebp - 0x204]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x444], eax
cmp dword [ebp - 0x444], 0xffffffff
je 0x10006511
lea edx, [ebp - 0x418]
push edx
mov eax, dword [ebp - 0x444]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x10006511
mov ecx, dword [ebp - 0x40c]
cmp ecx, dword [ebp - 0x414]
jl 0x1000651b
jg 0x10006511
mov edx, dword [ebp - 0x410]
cmp edx, dword [ebp - 0x418]
jbe 0x1000651b
mov dword [ebp - 0x420], 0x1b6b
cmp dword [ebp - 0x40c], 0
jl 0x10006572
jg 0x1000652f
cmp dword [ebp - 0x410], 0
jbe 0x10006572
push 0
push 0
mov eax, dword [ebp - 0x40c]
push eax
mov ecx, dword [ebp - 0x410]
push ecx
mov edx, dword [ebp - 0x444]
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov eax, dword [ebp - 0x418]
sub eax, dword [ebp - 0x410]
mov ecx, dword [ebp - 0x414]
sbb ecx, dword [ebp - 0x40c]
mov dword [ebp - 0x418], eax
mov dword [ebp - 0x414], ecx
push 0
push 0
push 0
push 0x428
lea edx, [ebp - 0x428]
push edx
mov ecx, dword [ebp - 0x488]
add ecx, 4
call fcn.10004d00
test eax, eax
jne 0x100065a8
mov eax, dword [ebp - 0x444]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x100069f1
cmp dword [ebp - 0x420], 0
jne 0x100065c1
mov ecx, dword [ebp - 0x418]
or ecx, dword [ebp - 0x414]
test ecx, ecx
jne 0x100065d3
mov edx, dword [ebp - 0x444]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10006445
mov eax, dword [ebp - 0x418]
mov dword [ebp - 0x440], eax
mov ecx, dword [ebp - 0x414]
mov dword [ebp - 0x43c], ecx
mov dword [ebp - 0x438], 0
mov dword [ebp - 0x434], 0x1fffe
mov dword [ebp - 0x448], 0
mov edx, dword [ebp - 0x434]
push edx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [ebp - 0x470], eax
mov eax, dword [ebp - 0x470]
mov dword [ebp - 0x430], eax
cmp dword [ebp - 0x43c], 0
jl 0x10006760
jg 0x10006646
cmp dword [ebp - 0x440], 0
jbe 0x10006760
mov ecx, dword [ebp - 0x434]
xor edx, edx
mov dword [ebp - 0x490], ecx
mov dword [ebp - 0x48c], edx
mov eax, dword [ebp - 0x43c]
cmp eax, dword [ebp - 0x48c]
jl 0x1000668e
jg 0x10006678
mov ecx, dword [ebp - 0x440]
cmp ecx, dword [ebp - 0x490]
jbe 0x1000668e
mov edx, dword [ebp - 0x434]
xor eax, eax
mov dword [ebp - 0x498], edx
mov dword [ebp - 0x494], eax
jmp 0x100066a6
mov ecx, dword [ebp - 0x440]
mov dword [ebp - 0x498], ecx
mov edx, dword [ebp - 0x43c]
mov dword [ebp - 0x494], edx
mov eax, dword [ebp - 0x498]
mov dword [ebp - 0x438], eax
push 0
lea ecx, [ebp - 0x448]
push ecx
mov edx, dword [ebp - 0x438]
push edx
mov eax, dword [ebp - 0x430]
push eax
mov ecx, dword [ebp - 0x444]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
push 0
push 0
mov edx, dword [ebp - 0x438]
push edx
mov eax, dword [ebp - 0x430]
push eax
mov ecx, dword [ebp - 0x488]
add ecx, 4
call fcn.10004d00
test eax, eax
jne 0x10006737
mov ecx, dword [ebp - 0x488]
add ecx, 4
call fcn.10004cb0
mov ecx, dword [ebp - 0x430]
mov dword [ebp - 0x474], ecx
mov edx, dword [ebp - 0x474]
push edx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov eax, dword [ebp - 0x444]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x100069ff
mov ecx, dword [ebp - 0x438]
xor edx, edx
mov eax, dword [ebp - 0x440]
sub eax, ecx
mov ecx, dword [ebp - 0x43c]
sbb ecx, edx
mov dword [ebp - 0x440], eax
mov dword [ebp - 0x43c], ecx
jmp 0x1000662a
mov edx, dword [ebp - 0x430]
mov dword [ebp - 0x478], edx
mov eax, dword [ebp - 0x478]
push eax
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov ecx, dword [ebp - 0x444]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x100069ec
push 0
push 0x80
push 4
push 0
push 0
push 0x40000000
lea edx, [ebp - 0x204]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x46c], eax
cmp dword [ebp - 0x46c], 0xffffffff
je 0x100067f1
lea eax, [ebp - 0x410]
push eax
mov ecx, dword [ebp - 0x46c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x100067f1
mov edx, dword [ebp - 0x40c]
cmp edx, dword [ebp - 0x414]
jl 0x100067fb
jg 0x100067f1
mov eax, dword [ebp - 0x410]
cmp eax, dword [ebp - 0x418]
jbe 0x100067fb
mov dword [ebp - 0x420], 0x1b6c
mov dword [ebp - 0x460], 0
mov dword [ebp - 0x45c], 0
push 2
push 0
mov ecx, dword [ebp - 0x45c]
push ecx
mov edx, dword [ebp - 0x460]
push edx
mov eax, dword [ebp - 0x46c]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov ecx, dword [ebp - 0x418]
sub ecx, dword [ebp - 0x410]
mov edx, dword [ebp - 0x414]
sbb edx, dword [ebp - 0x40c]
mov dword [ebp - 0x418], ecx
mov dword [ebp - 0x414], edx
push 0
push 0
push 0
push 0x428
lea eax, [ebp - 0x428]
push eax
mov ecx, dword [ebp - 0x488]
add ecx, 4
call fcn.10004d00
test eax, eax
jne 0x10006888
mov ecx, dword [ebp - 0x46c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x100069f1
cmp dword [ebp - 0x420], 0
je 0x100068a3
mov edx, dword [ebp - 0x46c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10006445
mov eax, dword [ebp - 0x418]
mov dword [ebp - 0x468], eax
mov ecx, dword [ebp - 0x414]
mov dword [ebp - 0x464], ecx
mov dword [ebp - 0x458], 0
mov dword [ebp - 0x450], 0x1fffe
mov dword [ebp - 0x454], 0
mov edx, dword [ebp - 0x450]
push edx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [ebp - 0x47c], eax
mov eax, dword [ebp - 0x47c]
mov dword [ebp - 0x44c], eax
cmp dword [ebp - 0x464], 0
jl 0x100069c4
jg 0x10006916
cmp dword [ebp - 0x468], 0
jbe 0x100069c4
push 0
lea ecx, [ebp - 0x458]
push ecx
mov edx, dword [ebp - 0x44c]
push edx
push 0
push 0
mov ecx, dword [ebp - 0x488]
add ecx, 4
call fcn.10004d00
test eax, eax
jne 0x10006977
mov ecx, dword [ebp - 0x488]
add ecx, 4
call fcn.10004cb0
mov eax, dword [ebp - 0x44c]
mov dword [ebp - 0x480], eax
mov ecx, dword [ebp - 0x480]
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov edx, dword [ebp - 0x46c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x100069ff
push 0
lea eax, [ebp - 0x454]
push eax
mov ecx, dword [ebp - 0x458]
push ecx
mov edx, dword [ebp - 0x44c]
push edx
mov eax, dword [ebp - 0x46c]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x458]
xor edx, edx
mov eax, dword [ebp - 0x468]
sub eax, ecx
mov ecx, dword [ebp - 0x464]
sbb ecx, edx
mov dword [ebp - 0x468], eax
mov dword [ebp - 0x464], ecx
jmp 0x100068fa
mov edx, dword [ebp - 0x44c]
mov dword [ebp - 0x484], edx
mov eax, dword [ebp - 0x484]
push eax
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov ecx, dword [ebp - 0x46c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10006445
mov ecx, dword [ebp - 0x488]
add ecx, 4
call fcn.10004cb0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4