Function at 0x401b1e
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x1c0]
sub esp, 0x240
mov eax, dword [0x4163e0]
xor eax, ebp
mov dword [ebp + 0x1bc], eax
mov eax, dword [ebp + 0x1c8]
push ebx
mov dword [ebp - 0x64], eax
mov eax, dword [ebp + 0x1cc]
push esi
mov dword [ebp - 0x78], eax
mov eax, dword [ebp + 0x1d0]
push edi
mov esi, ecx
push 0x2711
mov dword [ebp - 0x68], esi
mov dword [ebp - 0x7c], eax
call fcn.00404a31
test eax, eax
setne bl
mov byte [ebp - 0x60], bl
push 0x88
push dword [ebp - 0x60]
mov dword [ebp - 0x6c], eax
call fcn.00401b00
add esp, 0xc
test bl, bl
je 0x401c03
push esi
mov esi, 0x2710
push esi
push 1
push dword [ebp - 0x6c]
call fcn.00404a16
add esp, 0x10
mov edi, eax
cmp edi, esi
jne 0x401bd9
push dword [ebp - 0x64]
push esi
push 1
push dword [ebp - 0x6c]
call fcn.004046f8
cmp eax, esi
sete bl
mov byte [ebp - 0x60], bl
push 0x91
push dword [ebp - 0x60]
call fcn.00401b00
push dword [ebp - 0x68]
push esi
push 1
push dword [ebp - 0x6c]
call fcn.00404a16
add esp, 0x28
test bl, bl
mov edi, eax
jne 0x401b9b
test bl, bl
je 0x401c03
push dword [ebp - 0x64]
push edi
push 1
push dword [ebp - 0x6c]
call fcn.004046f8
cmp eax, edi
sete bl
mov byte [ebp - 0x60], bl
push 0x98
push dword [ebp - 0x60]
call fcn.00401b00
add esp, 0x18
xor esi, esi
cmp dword [ebp - 0x64], esi
je 0x401c13
push dword [ebp - 0x64]
call fcn.0040451d
pop ecx
cmp dword [ebp - 0x68], esi
je 0x401c21
push dword [ebp - 0x68]
call fcn.0040451d
pop ecx
test bl, bl
je 0x401ee2
push 0x41249c
push dword [ebp - 0x78]
mov dword [ebp - 0x64], esi
call fcn.00404498
mov edi, eax
test edi, edi
setne bl
mov byte [ebp - 0x60], bl
push 0xae
push dword [ebp - 0x60]
mov dword [ebp - 0x74], edi
call fcn.00401b00
add esp, 0x10
test bl, bl
je 0x401db3
push 2
push 0
push edi
call fcn.0040434f
mov ebx, eax
neg ebx
sbb bl, bl
inc bl
mov byte [ebp - 0x60], bl
push 0xb4
push dword [ebp - 0x60]
call fcn.00401b00
add esp, 0x14
test bl, bl
je 0x401db3
push edi
call fcn.0040425a
mov esi, eax
test esi, esi
setne bl
mov byte [ebp - 0x60], bl
push 0xbb
push dword [ebp - 0x60]
call fcn.00401b00
add esp, 0xc
test bl, bl
je 0x401db6
push 0
lea eax, [esi - 8]
push eax
push edi
call fcn.0040434f
mov ebx, eax
neg ebx
sbb bl, bl
inc bl
mov byte [ebp - 0x60], bl
push 0xc1
push dword [ebp - 0x60]
call fcn.00401b00
add esp, 0x14
test bl, bl
je 0x401db6
push 0x10
lea eax, [ebp + 0x1ac]
push 0
push eax
call fcn.00403c10
push edi
push 8
lea eax, [ebp + 0x1ac]
push 1
push eax
call fcn.00404a16
add esp, 0x1c
test eax, eax
je 0x401d1b
lea eax, [ebp + 0x1ac]
push eax
call fcn.004040ac
mov dword [ebp - 0x70], eax
jmp 0x401d2a
push 0xce
push 0
xor bl, bl
call fcn.00401b00
pop ecx
test bl, bl
pop ecx
je 0x401db6
push dword [ebp - 0x70]
call fcn.00403fe9
test eax, eax
setne bl
mov byte [ebp - 0x60], bl
push 0xd6
push dword [ebp - 0x60]
mov dword [ebp - 0x64], eax
call fcn.00401b00
add esp, 0xc
test bl, bl
je 0x401db6
mov eax, esi
sub eax, dword [ebp - 0x70]
push 0
sub eax, 8
push eax
push edi
call fcn.0040434f
mov ebx, eax
neg ebx
sbb bl, bl
inc bl
mov byte [ebp - 0x60], bl
push 0xdc
push dword [ebp - 0x60]
call fcn.00401b00
add esp, 0x14
test bl, bl
je 0x401db6
push edi
push dword [ebp - 0x70]
push 1
push dword [ebp - 0x64]
call fcn.00404a16
cmp eax, dword [ebp - 0x70]
push 0xe2
sete bl
mov byte [ebp - 0x60], bl
push dword [ebp - 0x60]
call fcn.00401b00
add esp, 0x18
jmp 0x401db6
mov esi, dword [ebp - 0x78]
and dword [ebp - 0x68], 0
test bl, bl
je 0x401e95
push str.cabinet.dll
push dword [ebp - 0x7c]
lea eax, [ebp - 0x5c]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x68], eax
jne 0x401e21
call edi
push eax
lea eax, [ebp - 0x5c]
push eax
push str.CreateFile__s_error__d
push 0x412440
call fcn.0040121d
add esp, 0x10
xor bl, bl
test bl, bl
je 0x401e92
push 0
lea eax, [ebp - 0x80]
push eax
push dword [ebp - 0x70]
push dword [ebp - 0x64]
push dword [ebp - 0x68]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x401e59
call edi
push eax
lea eax, [ebp - 0x5c]
push eax
push str.WriteFile__s_error__d
push 0x412440
call fcn.0040121d
add esp, 0x10
xor bl, bl
test bl, bl
je 0x401e92
push 0
push 0
push dword [ebp - 0x74]
call fcn.0040434f
sub esi, dword [ebp - 0x70]
add esp, 0xc
sub esi, 8
push esi
push dword [ebp - 0x74]
call fcn.004033a0
test eax, eax
setne bl
mov byte [ebp - 0x60], bl
push 0x102
push dword [ebp - 0x60]
call fcn.00401b00
pop ecx
pop ecx
mov edi, dword [ebp - 0x74]
cmp dword [ebp - 0x64], 0
je 0x401ea4
push dword [ebp - 0x64]
call fcn.00403f0c
pop ecx
test edi, edi
je 0x401eaf
push edi
call fcn.0040451d
pop ecx
cmp dword [ebp - 0x68], 0
je 0x401ebe
push dword [ebp - 0x68]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test bl, bl
je 0x401ee2
push dword [ebp - 0x7c]
push dword [ebp - 0x78]
call fcn.00402b80
mov bl, al
mov byte [ebp - 0x60], bl
push 0x116
push dword [ebp - 0x60]
call fcn.00401b00
add esp, 0x10
cmp dword [ebp - 0x6c], 0
je 0x401ef1
push dword [ebp - 0x6c]
call fcn.00403f07
pop ecx
mov ecx, dword [ebp + 0x1bc]
pop edi
pop esi
mov al, bl
xor ecx, ebp
pop ebx
call fcn.00403bf4
add ebp, 0x1c0
leave
ret