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

Disassembly:
pop ebp
ret
add dword [eax], edx
mov dword [ebp - 4], 0
push eax
xor eax, eax
je 0x1000669b
jae 0x10006633
mov eax, dword [0xf04d8b58]
pop eax
mov ecx, dword [ebp - 0x10]
add ecx, 4
call fcn.10004c50
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
add ecx, 4
call fcn.10003800
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ebp
mov ebp, esp
sub esp, 0x498
push ebx
push esi
push edi
mov dword [ebp - 0x488], ecx
push eax
xor eax, eax
je 0x100066ee
jae 0x10006686
mov eax, dword [0x8458b58]
pop eax
mov eax, dword [ebp + 8]
push eax
push 0x1f48
mov ecx, dword [ebp - 0x488]
add ecx, 4
call fcn.10004ab0
test eax, eax
jne 0x1000670f
jmp 0x10006cc9
mov ecx, 1
test ecx, ecx
je 0x10006cbb
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.10004c90
test eax, eax
jne 0x1000676a
jmp 0x10006cbb
cmp dword [ebp - 0x424], 0
jne 0x10006a57
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 0x100067db
lea edx, [ebp - 0x418]
push edx
mov eax, dword [ebp - 0x444]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x100067db
mov ecx, dword [ebp - 0x40c]
cmp ecx, dword [ebp - 0x414]
jl 0x100067e5
jg 0x100067db
mov edx, dword [ebp - 0x410]
cmp edx, dword [ebp - 0x418]
jbe 0x100067e5
mov dword [ebp - 0x420], 0x1b6b
cmp dword [ebp - 0x40c], 0
jl 0x1000683c
jg 0x100067f9
cmp dword [ebp - 0x410], 0
jbe 0x1000683c
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.10004c90
test eax, eax
jne 0x10006872
mov eax, dword [ebp - 0x444]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10006cbb
cmp dword [ebp - 0x420], 0
jne 0x1000688b
mov ecx, dword [ebp - 0x418]
or ecx, dword [ebp - 0x414]
test ecx, ecx
jne 0x1000689d
mov edx, dword [ebp - 0x444]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1000670f
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 0x10006a2a
jg 0x10006910
cmp dword [ebp - 0x440], 0
jbe 0x10006a2a
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 0x10006958
jg 0x10006942
mov ecx, dword [ebp - 0x440]
cmp ecx, dword [ebp - 0x490]
jbe 0x10006958
mov edx, dword [ebp - 0x434]
xor eax, eax
mov dword [ebp - 0x498], edx
mov dword [ebp - 0x494], eax
jmp 0x10006970
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.10004c90
test eax, eax
jne 0x10006a01
mov ecx, dword [ebp - 0x488]
add ecx, 4
call fcn.10004c50
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 0x10006cc9
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 0x100068f4
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 0x10006cb6
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 0x10006abb
lea eax, [ebp - 0x410]
push eax
mov ecx, dword [ebp - 0x46c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x10006abb
mov edx, dword [ebp - 0x40c]
cmp edx, dword [ebp - 0x414]
jl 0x10006ac5
jg 0x10006abb
mov eax, dword [ebp - 0x410]
cmp eax, dword [ebp - 0x418]
jbe 0x10006ac5
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.10004c90
test eax, eax
jne 0x10006b52
mov ecx, dword [ebp - 0x46c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10006cbb
cmp dword [ebp - 0x420], 0
je 0x10006b6d
mov edx, dword [ebp - 0x46c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1000670f
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 0x10006c8e
jg 0x10006be0
cmp dword [ebp - 0x468], 0
jbe 0x10006c8e
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.10004c90
test eax, eax
jne 0x10006c41
mov ecx, dword [ebp - 0x488]
add ecx, 4
call fcn.10004c50
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 0x10006cc9
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 0x10006bc4
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 0x1000670f
mov ecx, dword [ebp - 0x488]
add ecx, 4
call fcn.10004c50
pop edi
pop esi
pop ebx