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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x495700
mov eax, dword fs:[0]
push eax
push ecx
sub esp, 0x1d4
mov eax, dword [0x4cf0c0]
xor eax, ebp
mov dword [ebp - 0x48], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x1d4], ecx
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
lea eax, [ebp - 0x38]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x2c], 0
mov ecx, dword [ebp + 8]
push ecx
call fcn.00474cdc
add esp, 4
cmp eax, 0x15f95
je 0x40664b
xor al, al
jmp 0x406c8a
mov dword [ebp - 4], 0
push 0
push 0
push 3
push 0
push 1
push accept
push str.D:cache90005.txt
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0xffffffff
jne 0x406692
push 0
push 0
push 3
push 0
push 7
push accept
push str.D:cachec_90005.txt
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0xffffffff
je 0x406733
push 0
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0xa
jae 0x4066c2
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x406c8a
mov eax, dword [ebp - 0x1c]
xor edx, edx
mov ecx, 2
div ecx
add edx, dword [ebp - 0x1c]
push edx
call fcn.00474930
add esp, 4
mov dword [ebp - 0x1d8], eax
mov edx, dword [ebp - 0x1d8]
mov dword [ebp - 0x1cc], edx
mov eax, dword [ebp - 0x1cc]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x40670c
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x406c8a
push 0
lea edx, [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x28]
push ecx
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40673a
xor al, al
jmp 0x406c8a
mov ecx, dword [ebp - 0x1d4]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x28]
mov dword [edx + 0x8fc], eax
mov ecx, dword [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 0x28]
push edx
mov eax, dword [ebp - 0x14]
push eax
call fcn.0044a480
add esp, 0xc
mov dword [ebp - 0x40], 0
push 0xc8
push 0
lea ecx, [ebp - 0x1b0]
push ecx
call fcn.00474130
add esp, 0xc
mov edx, dword [ebp - 0x14]
push edx
push 0xbe
lea eax, [ebp - 0x1b0]
push eax
call fcn.004073e0
add esp, 0xc
mov dword [ebp - 0x1dc], eax
mov ecx, dword [ebp - 0x1dc]
mov dword [ebp - 0x40], ecx
mov edx, dword [ebp - 0x28]
add edx, dword [ebp - 0x40]
mov dword [ebp - 0x28], edx
mov eax, dword [ebp - 0x1d4]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x28]
mov dword [ecx + 0x900], edx
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x1c0], 0
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x44], eax
movzx ecx, byte [ebp - 0x1b0]
cmp ecx, 0xef
jne 0x40680e
movzx edx, byte [ebp - 0x1af]
cmp edx, 0xbb
jne 0x40680e
movzx eax, byte [ebp - 0x1ae]
cmp eax, 0xbf
jne 0x40680e
lea ecx, [ebp - 0x1ad]
mov dword [ebp - 0x1c4], ecx
jmp 0x40681a
lea edx, [ebp - 0x1b0]
mov dword [ebp - 0x1c4], edx
mov dword [ebp - 0x3c], 0
jmp 0x406832
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x3c], eax
mov ecx, dword [ebp - 0x3c]
add ecx, 1
mov dword [ebp - 0x3c], ecx
mov edx, dword [ebp - 0x3c]
cmp edx, dword [ebp - 0x44]
ja 0x4068f1
mov eax, dword [ebp - 0x1c4]
add eax, dword [ebp - 0x3c]
movsx ecx, byte [eax]
cmp ecx, 0x7c
jne 0x4068ec
mov edx, dword [ebp - 0x1c4]
add edx, dword [ebp - 0x3c]
mov byte [edx], 0
push 0x32
push 0
lea eax, [ebp - 0x7c]
push eax
call fcn.00474130
add esp, 0xc
mov ecx, dword [ebp - 0x1c4]
add ecx, dword [ebp - 0x1c0]
mov dword [ebp - 0x1c8], ecx
mov edx, dword [ebp - 0x3c]
sub edx, dword [ebp - 0x1c0]
mov dword [ebp - 0x1b8], edx
mov eax, dword [ebp - 0x1b8]
push eax
mov ecx, dword [ebp - 0x1c8]
push ecx
lea edx, [ebp - 0x7c]
push edx
call fcn.00476380
add esp, 0xc
mov eax, dword [ebp - 0x1c0]
push eax
mov ecx, dword [ebp - 0x1b8]
push ecx
lea edx, [ebp - 0x7c]
push edx
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x1d4]
call fcn.00406cb0
mov ecx, dword [ebp - 0x18]
add ecx, 1
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x3c]
mov dword [ebp - 0x1c0], edx
mov eax, dword [ebp - 0x1c0]
add eax, 1
mov dword [ebp - 0x1c0], eax
jmp 0x406823
mov ecx, dword [ebp - 0x1d4]
mov edx, dword [ecx]
mov dword [edx], 0
mov eax, dword [ebp - 0x1d4]
mov ecx, dword [eax]
mov dword [ecx + 0x108], 0
push 0x12d000
call fcn.00474930
add esp, 4
mov dword [ebp - 0x1e0], eax
mov edx, dword [ebp - 0x1e0]
mov dword [ebp - 0x1d0], edx
mov eax, dword [ebp - 0x1d4]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x1d0]
mov dword [ecx + 0x108], edx
mov eax, dword [ebp - 0x1d4]
mov ecx, dword [eax]
cmp dword [ecx + 0x108], 0
jne 0x40695c
xor al, al
jmp 0x406c8a
mov edx, dword [ebp - 0x1d4]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x1d4]
mov edx, dword [ecx]
mov ecx, dword [edx + 0x108]
mov dword [eax + 0x110], ecx
push 0x12c
push 0
lea edx, [ebp - 0x1b0]
push edx
call fcn.00474130
add esp, 0xc
mov eax, dword [ebp - 0x14]
push eax
push 0x122
lea ecx, [ebp - 0x1b0]
push ecx
call fcn.004073e0
add esp, 0xc
mov dword [ebp - 0x1e4], eax
mov edx, dword [ebp - 0x1e4]
mov dword [ebp - 0x40], edx
cmp dword [ebp - 0x40], 1
ja 0x4069c0
jmp 0x406b09
movsx eax, byte [ebp - 0x1b0]
cmp eax, 0x20
je 0x406a1a
lea ecx, [ebp - 0x1b0]
push ecx
call fcn.00474cdc
add esp, 4
cmp eax, 0x3e8
jge 0x406a18
mov edx, dword [ebp - 0x1d4]
mov eax, dword [edx]
mov ecx, dword [eax]
push ecx
lea edx, [ebp - 0x1b0]
push edx
push 0x499a88
call fcn.00476e12
add esp, 0xc
mov eax, dword [ebp - 0x28]
add eax, dword [ebp - 0x40]
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x20]
add ecx, dword [ebp - 0x40]
mov dword [ebp - 0x20], ecx
jmp 0x406aff
jmp 0x406a66
lea edx, [ebp - 0x190]
push edx
call fcn.00474cdc
add esp, 4
cmp eax, 0x3e8
jge 0x406a66
mov eax, dword [ebp - 0x1d4]
mov ecx, dword [eax]
mov edx, dword [ecx]
push edx
lea eax, [ebp - 0x1b0]
push eax
push 0x499aa4
call fcn.00476e12
add esp, 0xc
mov ecx, dword [ebp - 0x28]
add ecx, dword [ebp - 0x40]
mov dword [ebp - 0x28], ecx
mov edx, dword [ebp - 0x20]
add edx, dword [ebp - 0x40]
mov dword [ebp - 0x20], edx
jmp 0x406aff
mov eax, dword [ebp - 0x1d4]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x110]
mov eax, dword [ebp - 0x40]
mov dword [edx], eax
mov ecx, dword [ebp - 0x1d4]
mov edx, dword [ecx]
mov eax, dword [edx + 0x110]
mov ecx, dword [ebp - 0x20]
mov dword [eax + 4], ecx
mov edx, dword [ebp - 0x1d4]
mov eax, dword [edx]
mov ecx, dword [eax + 0x110]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x28]
mov byte [eax + edx - 1], 0
mov ecx, dword [ebp - 0x28]
add ecx, dword [ebp - 0x40]
mov dword [ebp - 0x28], ecx
mov edx, dword [ebp - 0x20]
add edx, dword [ebp - 0x40]
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x1d4]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x1d4]
mov eax, dword [edx]
mov edx, dword [eax + 0x110]
add edx, 8
mov dword [ecx + 0x110], edx
mov eax, dword [ebp - 0x1d4]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x1d4]
mov eax, dword [edx]
mov edx, dword [eax]
add edx, 1
mov dword [ecx], edx
mov eax, dword [ebp - 0x1d4]
mov ecx, dword [eax]
cmp dword [ecx], 0x186a0
jl 0x406aff
jmp 0x406b09
cmp dword [ebp - 0x40], 0xa
ja 0x406978
mov edx, dword [ebp - 0x1d4]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x1d4]
mov edx, dword [ecx]
mov ecx, dword [edx + 0x110]
sub ecx, 8
mov dword [eax + 0x110], ecx
mov dword [ebp - 0x1b4], 0
push 0
push 0
push 2
push 0
push 2
push 0x40000000
push 0x499ac0
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0xffffffff
je 0x406b9d
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x1bc], edx
mov eax, dword [ebp - 0x1d4]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x8fc]
mov dword [ebp - 0x1b4], edx
push 0
lea eax, [ebp - 0x1bc]
push eax
mov ecx, dword [ebp - 0x1bc]
push ecx
mov edx, dword [ebp - 0x1b4]
push edx
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 0
push 2
push 0
push 2
push 0x40000000
push 0x499ad4
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0xffffffff
je 0x406c2d
mov edx, dword [ebp - 0x1d4]
mov eax, dword [edx]
mov ecx, dword [eax]
shl ecx, 3
mov dword [ebp - 0x1bc], ecx
mov eax, dword [ebp - 0x1bc]
xor edx, edx
mov ecx, 2
div ecx
add edx, dword [ebp - 0x1bc]
mov dword [ebp - 0x1bc], edx
mov edx, dword [ebp - 0x1d4]
mov eax, dword [edx]
mov ecx, dword [eax + 0x108]
mov dword [ebp - 0x1b4], ecx
push 0
lea edx, [ebp - 0x1bc]
push edx
mov eax, dword [ebp - 0x1bc]
push eax
mov ecx, dword [ebp - 0x1b4]
push ecx
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x1d4]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x1d4]
mov ecx, dword [eax]
mov eax, dword [ecx + 0x110]
mov dword [edx + 0x10c], eax
mov ecx, dword [ebp - 0x1d4]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x1d4]
mov ecx, dword [eax]
mov eax, dword [ecx + 0x108]
mov dword [edx + 0x110], eax
jmp 0x406c81
mov dword [ebp - 4], 0xffffffff
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x48]
xor ecx, ebp
call fcn.00474590
mov esp, ebp
pop ebp
ret 4