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

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
mov ecx, dword [ebp - 4]
add ecx, 4
call fcn.100037e0
mov eax, dword [ebp - 4]
mov dword [eax], 0x10012398
push eax
xor eax, eax
add eax, eax
xor eax, eax
xor eax, eax
je 0x100066f0
inc ebx
push edi
je 0x10006749
pop eax
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
inc ebp
cld
add byte [eax], al
add byte [eax], al
push eax
xor eax, eax
add eax, eax
xor eax, eax
xor eax, eax
je 0x10006761
inc ebx
push edi
je 0x100067ba
pop eax
mov ecx, dword [ebp - 0x10]
add ecx, 4
call fcn.10004cd0
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
add ecx, 4
call fcn.10003860
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
dec eax
pop ds
add byte [eax], al
mov ecx, dword [ebp - 0x488]
add ecx, 4
call fcn.10004b20
test eax, eax
jne 0x100067d5
jmp 0x10006d8f
mov ecx, 1
test ecx, ecx
je 0x10006d81
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.10004d20
test eax, eax
jne 0x10006830
jmp 0x10006d81
cmp dword [ebp - 0x424], 0
jne 0x10006b1d
push 0
push 0x80
push 3
push 0
push 1
push connect
lea ecx, [ebp - 0x204]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x444], eax
cmp dword [ebp - 0x444], 0xffffffff
je 0x100068a1
lea edx, [ebp - 0x418]
push edx
mov eax, dword [ebp - 0x444]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x100068a1
mov ecx, dword [ebp - 0x40c]
cmp ecx, dword [ebp - 0x414]
jl 0x100068ab
jg 0x100068a1
mov edx, dword [ebp - 0x410]
cmp edx, dword [ebp - 0x418]
jbe 0x100068ab
mov dword [ebp - 0x420], 0x1b6b
cmp dword [ebp - 0x40c], 0
jl 0x10006902
jg 0x100068bf
cmp dword [ebp - 0x410], 0
jbe 0x10006902
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.10004d20
test eax, eax
jne 0x10006938
mov eax, dword [ebp - 0x444]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10006d81
cmp dword [ebp - 0x420], 0
jne 0x10006951
mov ecx, dword [ebp - 0x418]
or ecx, dword [ebp - 0x414]
test ecx, ecx
jne 0x10006963
mov edx, dword [ebp - 0x444]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x100067d5
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 0x10006af0
jg 0x100069d6
cmp dword [ebp - 0x440], 0
jbe 0x10006af0
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 0x10006a1e
jg 0x10006a08
mov ecx, dword [ebp - 0x440]
cmp ecx, dword [ebp - 0x490]
jbe 0x10006a1e
mov edx, dword [ebp - 0x434]
xor eax, eax
mov dword [ebp - 0x498], edx
mov dword [ebp - 0x494], eax
jmp 0x10006a36
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.10004d20
test eax, eax
jne 0x10006ac7
mov ecx, dword [ebp - 0x488]
add ecx, 4
call fcn.10004cd0
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 0x10006d8f
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 0x100069ba
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 0x10006d7c
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 0x10006b81
lea eax, [ebp - 0x410]
push eax
mov ecx, dword [ebp - 0x46c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x10006b81
mov edx, dword [ebp - 0x40c]
cmp edx, dword [ebp - 0x414]
jl 0x10006b8b
jg 0x10006b81
mov eax, dword [ebp - 0x410]
cmp eax, dword [ebp - 0x418]
jbe 0x10006b8b
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.10004d20
test eax, eax
jne 0x10006c18
mov ecx, dword [ebp - 0x46c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10006d81
cmp dword [ebp - 0x420], 0
je 0x10006c33
mov edx, dword [ebp - 0x46c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x100067d5
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 0x10006d54
jg 0x10006ca6
cmp dword [ebp - 0x468], 0
jbe 0x10006d54
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.10004d20
test eax, eax
jne 0x10006d07
mov ecx, dword [ebp - 0x488]
add ecx, 4
call fcn.10004cd0
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 0x10006d8f
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 0x10006c8a
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 0x100067d5
mov ecx, dword [ebp - 0x488]
add ecx, 4
call fcn.10004cd0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4