Function at 0x417d00
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.0040358c
mov eax, dword [ebp - 8]
call fcn.0040358c
xor eax, eax
push ebp
push 0x41818d
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, 0x41eb74
mov edx, 0x4181a4
call fcn.0040326c
mov byte [ebp - 9], 0
mov eax, dword [ebp - 4]
call fcn.0040339c
test eax, eax
je 0x418154
mov eax, dword [ebp - 8]
call fcn.0040339c
test eax, eax
je 0x418154
push 0
lea eax, [ebp - 0xac]
push eax
mov eax, dword [ebp - 4]
call fcn.0040359c
push eax
call sub.kernel32.dll_OpenFile
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
jne 0x417de3
push 0x418248
push dword [ebp - 4]
push 0x418258
lea edx, [ebp - 0xb4]
xor eax, eax
call fcn.00405bb8
push dword [ebp - 0xb4]
lea eax, [ebp - 0xb0]
mov edx, 4
call fcn.0040345c
mov eax, dword [ebp - 0xb0]
call fcn.004128f8
jmp 0x418154
push 0
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_GetFileSize
add eax, 5
jae 0x417df8
call fcn.00402a08
mov dword [ebp - 0x14], eax
mov eax, 0x41eb74
mov edx, 0x418264
call fcn.0040326c
mov eax, dword [ebp - 0x14]
push eax
lea eax, [ebp - 0x1c]
mov ecx, 1
mov edx, dword [0x417ce0]
call fcn.00403d10
add esp, 4
xor eax, eax
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x417e32
cmp eax, dword [edx - 4]
jb 0x417e37
call fcn.00402a00
lea eax, [edx + eax]
mov edx, 0x41d27c
mov ecx, 5
call fcn.0040441c
push 0
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x14]
sub eax, 5
jae 0x417e5c
call fcn.00402a08
push eax
mov eax, 5
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x417e6e
cmp eax, dword [edx - 4]
jb 0x417e73
call fcn.00402a00
lea eax, [edx + eax]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_ReadFile
test eax, eax
jne 0x417ec4
push 0x418314
push dword [ebp - 4]
push 0x418258
lea edx, [ebp - 0xbc]
xor eax, eax
call fcn.00405bb8
push dword [ebp - 0xbc]
lea eax, [ebp - 0xb8]
mov edx, 4
call fcn.0040345c
mov eax, dword [ebp - 0xb8]
call fcn.004128f8
jmp 0x418154
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_CloseHandle
cmp dword [ebp - 0x14], 0xa
jbe 0x417fc7
mov eax, 5
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x417ee8
cmp eax, dword [edx - 4]
jb 0x417eed
call fcn.00402a00
mov al, byte [edx + eax]
cmp al, byte [0x41d27c]
jne 0x417fc7
mov eax, 6
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x417f0d
cmp eax, dword [edx - 4]
jb 0x417f12
call fcn.00402a00
mov al, byte [edx + eax]
cmp al, byte [0x41d27d]
jne 0x417fc7
mov eax, 7
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x417f32
cmp eax, dword [edx - 4]
jb 0x417f37
call fcn.00402a00
mov al, byte [edx + eax]
cmp al, byte [0x41d27e]
jne 0x417fc7
mov eax, 8
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x417f57
cmp eax, dword [edx - 4]
jb 0x417f5c
call fcn.00402a00
mov al, byte [edx + eax]
cmp al, byte [0x41d27f]
jne 0x417fc7
mov eax, 9
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x417f78
cmp eax, dword [edx - 4]
jb 0x417f7d
call fcn.00402a00
mov al, byte [edx + eax]
cmp al, byte [0x41d280]
jne 0x417fc7
push 0x418328
push dword [ebp - 4]
push 0x418338
push dword [ebp - 8]
lea eax, [ebp - 0xc0]
mov edx, 4
call fcn.0040345c
mov eax, dword [ebp - 0xc0]
call fcn.004128f8
mov eax, 0x41eb74
mov edx, 0x418350
call fcn.0040326c
jmp 0x418154
mov eax, 0x41eb74
mov edx, 0x418384
call fcn.0040326c
mov eax, dword [ebp - 0x14]
sub eax, 1
jae 0x417fe3
call fcn.00402a08
sub eax, 5
jb 0x4180bb
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 0x418006
cmp eax, dword [edx - 4]
jb 0x41800b
call fcn.00402a00
xor byte [edx + eax], 0xc2
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x41801e
cmp eax, dword [edx - 4]
jb 0x418023
call fcn.00402a00
movzx eax, byte [edx + eax]
add eax, 0x79
jno 0x418031
call fcn.00402a08
add eax, 0x8000
cmp eax, 0xffff
jbe 0x418042
call fcn.00402a00
add eax, 0xffff8000
mov word [ebp - 0x1e], ax
cmp word [ebp - 0x1e], 0xff
jle 0x418087
movsx eax, word [ebp - 0x1e]
sub eax, 0xff
jno 0x418063
call fcn.00402a08
sub eax, 1
jno 0x41806d
call fcn.00402a08
add eax, 0x8000
cmp eax, 0xffff
jbe 0x41807e
call fcn.00402a00
add eax, 0xffff8000
mov word [ebp - 0x1e], ax
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x418096
cmp eax, dword [edx - 4]
jb 0x41809b
call fcn.00402a00
movsx ecx, word [ebp - 0x1e]
cmp ecx, 0xff
jbe 0x4180ac
call fcn.00402a00
mov byte [edx + eax], cl
inc dword [ebp - 0x18]
dec dword [ebp - 0x24]
jne 0x417ff7
mov eax, dword [ebp - 8]
call fcn.0040339c
test eax, eax
jne 0x4180d2
lea eax, [ebp - 8]
mov edx, dword [ebp - 4]
call fcn.004032b0
mov eax, 0x41eb74
mov edx, 0x4183d8
call fcn.0040326c
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
mov eax, dword [ebp - 8]
call fcn.0040359c
push eax
call sub.kernel32.dll_CreateFileA
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
je 0x418154
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 0x418122
cmp eax, dword [edx - 4]
jb 0x418127
call fcn.00402a00
lea eax, [edx + eax]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_WriteFile_1
test eax, eax
je 0x41813c
mov byte [ebp - 9], 1
mov eax, 0x41eb74
mov edx, 0x418470
call fcn.0040326c
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_CloseHandle
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x418194
lea eax, [ebp - 0xc0]
mov edx, 5
call fcn.0040323c
lea eax, [ebp - 0x1c]
mov edx, dword [0x417ce0]
call fcn.00403d1c
lea eax, [ebp - 8]
mov edx, 2
call fcn.0040323c
ret