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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff40
xor ecx, ecx
mov dword [ebp - 0xc0], ecx
mov dword [ebp - 0xb8], ecx
mov dword [ebp - 0xbc], ecx
mov dword [ebp - 0xb0], ecx
mov dword [ebp - 0xb4], ecx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00403a94
mov eax, dword [ebp - 8]
call fcn.00403a94
xor eax, eax
push ebp
push 0x4183c0
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 9], 0
mov eax, dword [ebp - 4]
call fcn.004038a4
test eax, eax
je 0x418387
mov eax, dword [ebp - 8]
call fcn.004038a4
test eax, eax
je 0x418387
push 0
lea eax, [ebp - 0xac]
push eax
mov eax, dword [ebp - 4]
call fcn.00403aa4
push eax
call sub.kernel32.dll_OpenFile
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
jne 0x418038
push 0x4183d8
push dword [ebp - 4]
push 0x4183e8
lea edx, [ebp - 0xb4]
xor eax, eax
call fcn.00406434
push dword [ebp - 0xb4]
lea eax, [ebp - 0xb0]
mov edx, 4
call fcn.00403964
mov eax, dword [ebp - 0xb0]
call fcn.00412f04
jmp 0x418387
push 0
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_GetFileSize_1
add eax, 5
jae 0x41804d
call fcn.00402f1c
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
push eax
lea eax, [ebp - 0x1c]
mov ecx, 1
mov edx, dword [0x417f44]
call fcn.00404218
add esp, 4
xor eax, eax
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x418078
cmp eax, dword [edx - 4]
jb 0x41807d
call fcn.00402f14
lea eax, [edx + eax]
mov edx, 0x41d2e0
mov ecx, 5
call fcn.0040492c
push 0
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x14]
sub eax, 5
jae 0x4180a2
call fcn.00402f1c
push eax
mov eax, 5
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x4180b4
cmp eax, dword [edx - 4]
jb 0x4180b9
call fcn.00402f14
lea eax, [edx + eax]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_ReadFile_1
test eax, eax
jne 0x41810a
push 0x4183f4
push dword [ebp - 4]
push 0x4183e8
lea edx, [ebp - 0xbc]
xor eax, eax
call fcn.00406434
push dword [ebp - 0xbc]
lea eax, [ebp - 0xb8]
mov edx, 4
call fcn.00403964
mov eax, dword [ebp - 0xb8]
call fcn.00412f04
jmp 0x418387
mov eax, 0x41eb54
mov edx, 0x418408
call fcn.00403780
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_CloseHandle_1
cmp dword [ebp - 0x14], 0xa
jbe 0x418209
mov eax, 5
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x41813d
cmp eax, dword [edx - 4]
jb 0x418142
call fcn.00402f14
mov al, byte [edx + eax]
cmp al, byte [0x41d2e0]
jne 0x418209
mov eax, 6
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x418162
cmp eax, dword [edx - 4]
jb 0x418167
call fcn.00402f14
mov al, byte [edx + eax]
cmp al, byte [0x41d2e1]
jne 0x418209
mov eax, 7
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x418187
cmp eax, dword [edx - 4]
jb 0x41818c
call fcn.00402f14
mov al, byte [edx + eax]
cmp al, byte [0x41d2e2]
jne 0x418209
mov eax, 8
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x4181a8
cmp eax, dword [edx - 4]
jb 0x4181ad
call fcn.00402f14
mov al, byte [edx + eax]
cmp al, byte [0x41d2e3]
jne 0x418209
mov eax, 9
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x4181c9
cmp eax, dword [edx - 4]
jb 0x4181ce
call fcn.00402f14
mov al, byte [edx + eax]
cmp al, byte [0x41d2e4]
jne 0x418209
push 0x4184c4
push dword [ebp - 4]
push 0x4184d4
push dword [ebp - 8]
lea eax, [ebp - 0xc0]
mov edx, 4
call fcn.00403964
mov eax, dword [ebp - 0xc0]
call fcn.00412f04
jmp 0x418387
mov eax, dword [ebp - 0x14]
sub eax, 1
jae 0x418216
call fcn.00402f1c
sub eax, 5
jb 0x4182ee
inc eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x18], 5
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x418239
cmp eax, dword [edx - 4]
jb 0x41823e
call fcn.00402f14
xor byte [edx + eax], 0xc2
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x418251
cmp eax, dword [edx - 4]
jb 0x418256
call fcn.00402f14
movzx eax, byte [edx + eax]
add eax, 0x79
jno 0x418264
call fcn.00402f1c
add eax, 0x8000
cmp eax, 0xffff
jbe 0x418275
call fcn.00402f14
add eax, 0xffff8000
mov word [ebp - 0x1e], ax
cmp word [ebp - 0x1e], 0xff
jle 0x4182ba
movsx eax, word [ebp - 0x1e]
sub eax, 0xff
jno 0x418296
call fcn.00402f1c
sub eax, 1
jno 0x4182a0
call fcn.00402f1c
add eax, 0x8000
cmp eax, 0xffff
jbe 0x4182b1
call fcn.00402f14
add eax, 0xffff8000
mov word [ebp - 0x1e], ax
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x4182c9
cmp eax, dword [edx - 4]
jb 0x4182ce
call fcn.00402f14
movsx ecx, word [ebp - 0x1e]
cmp ecx, 0xff
jbe 0x4182df
call fcn.00402f14
mov byte [edx + eax], cl
inc dword [ebp - 0x18]
dec dword [ebp - 0x24]
jne 0x41822a
mov eax, dword [ebp - 8]
call fcn.004038a4
test eax, eax
jne 0x418305
lea eax, [ebp - 8]
mov edx, dword [ebp - 4]
call fcn.004037c4
mov eax, 0x41eb54
mov edx, 0x4184ec
call fcn.00403780
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
mov eax, dword [ebp - 8]
call fcn.00403aa4
push eax
call sub.kernel32.dll_CreateFileA_1
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
je 0x418387
push 0
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x14]
push eax
xor eax, eax
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x418355
cmp eax, dword [edx - 4]
jb 0x41835a
call fcn.00402f14
lea eax, [edx + eax]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_WriteFile_1
test eax, eax
je 0x41836f
mov byte [ebp - 9], 1
mov eax, 0x41eb54
mov edx, 0x4185bc
call fcn.00403780
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4183c7
lea eax, [ebp - 0xc0]
mov edx, 5
call fcn.00403750
lea eax, [ebp - 0x1c]
mov edx, dword [0x417f44]
call fcn.00404224
lea eax, [ebp - 8]
mov edx, 2
call fcn.00403750
ret