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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41c088
mov eax, dword fs:[0]
push eax
sub esp, 0x48
mov eax, dword [0x42dc88]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x4c], edi
cmp dword [edi + 0x34], 0x10
lea ebx, [edi + 0x20]
mov dword [ebx + 0x10], 0
jb 0x40b1f4
mov eax, dword [ebx]
jmp 0x40b1f6
mov eax, ebx
mov byte [eax], 0
mov eax, dword [edi + 4]
mov ecx, 0x42198c
test al, 0x40
je 0x40b20c
mov eax, 0x421990
jmp 0x40b216
test al, 0x20
mov eax, 0x421994
cmove eax, ecx
push eax
push dword [ebp + 8]
mov dword [edi], 0
call dword [sym.imp.MSVCR110.dll_fopen]
add esp, 8
mov dword [edi], eax
test eax, eax
jne 0x40b23b
mov ecx, edi
call fcn.0040ae50
jmp 0x40b4b9
mov ecx, dword [edi + 4]
xor esi, esi
mov byte [ebp - 0x41], 1
mov dword [edi + 0x18], 1
test cl, 0x10
je 0x40b3e1
mov ebx, dword [sym.imp.MSVCR110.dll_fseek]
push 2
push esi
push eax
call ebx
push dword [edi]
call dword [sym.imp.MSVCR110.dll_ftell]
push esi
push esi
push dword [edi]
mov dword [edi + 0x10], eax
call ebx
mov eax, dword [edi + 0x10]
mov ebx, 0x400
add esp, 0x1c
mov dword [ebp - 0x50], ebx
cmp eax, ebx
jge 0x40b290
mov ebx, eax
mov dword [ebp - 0x50], ebx
test ebx, ebx
je 0x40b47d
push ebx
call fcn.0041aa3c
push dword [edi]
mov dword [ebp - 0x48], eax
push 1
push ebx
push eax
call dword [sym.imp.MSVCR110.dll_fread]
add esp, 0x14
cmp eax, 1
sete al
mov byte [ebp - 0x41], al
test al, al
je 0x40b3ce
and dword [edi + 4], 0xfffffffa
xor ecx, ecx
mov dword [ebp - 0x54], ecx
cmp dword [0x42d1d0], ecx
je 0x40b341
xor edx, edx
lea esp, [esp]
mov ebx, dword [edx + 0x42d1d4]
test ebx, ebx
jle 0x40b300
mov edi, dword [ebp - 0x50]
lea ecx, [ecx]
cmp esi, edi
jge 0x40b2fa
mov eax, dword [ebp - 0x48]
mov ecx, dword [edx + 0x42d1d0]
mov al, byte [eax + esi]
cmp al, byte [esi + ecx]
jne 0x40b2fa
inc esi
cmp esi, ebx
jl 0x40b2e0
mov edi, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x54]
cmp esi, ebx
je 0x40b319
inc ecx
mov edx, ecx
shl edx, 4
xor esi, esi
mov dword [ebp - 0x54], ecx
cmp dword [edx + 0x42d1d0], esi
jne 0x40b2d0
jmp 0x40b33e
shl ecx, 4
mov eax, dword [ecx + 0x42d1dc]
or eax, dword [edi + 4]
mov dword [edi + 4], eax
cmp esi, 2
jne 0x40b330
mov dword [edi + 0x18], esi
push dword [ecx + 0x42d1d8]
lea ecx, [edi + 0x38]
call fcn.00402420
mov ebx, dword [ebp - 0x50]
cmp ebx, esi
jle 0x40b353
push 0
push esi
push dword [edi]
call dword [sym.imp.MSVCR110.dll_fseek]
add esp, 0xc
test esi, esi
jne 0x40b3b3
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], esi
mov byte [ebp - 0x28], 0
push ebx
mov ebx, dword [ebp - 0x48]
push ebx
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], esi
call fcn.00407cc0
cmp dword [ebp - 0x14], 0x10
push ecx
mov ecx, esp
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
mov dword [ecx], eax
lea eax, [ebp - 0x40]
push eax
call fcn.0040cc20
add esp, 8
lea ecx, [edi + 0x38]
push eax
call fcn.004023e0
lea ecx, [ebp - 0x40]
call fcn.00402230
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 0xffffffff
call fcn.00402230
jmp 0x40b3b6
mov ebx, dword [ebp - 0x48]
cmp dword [edi + 0x48], 0
jne 0x40b3ce
cmp byte [ebx], 0x3c
jne 0x40b3ce
push str.UTF_8
lea ecx, [edi + 0x38]
call fcn.00402420
push dword [ebp - 0x48]
call sub.MSVCR110.dll_void___cdecl_operator_delete___void__
mov al, byte [ebp - 0x41]
add esp, 4
jmp 0x40b475
test cl, 0x20
je 0x40b480
test cl, 0x40
je 0x40b408
push 2
push 0
push eax
call dword [sym.imp.MSVCR110.dll_fseek]
push dword [edi]
call dword [sym.imp.MSVCR110.dll_ftell]
add esp, 0x10
mov dword [edi + 0x10], eax
xor ebx, ebx
cmp dword [0x42d1d0], ebx
je 0x40b47d
mov ecx, dword [edi + 4]
xor eax, eax
test dword [eax + 0x42d1dc], ecx
jne 0x40b42f
inc ebx
mov eax, ebx
shl eax, 4
cmp dword [eax + 0x42d1d0], esi
jne 0x40b417
jmp 0x40b47d
shl ebx, 4
mov esi, dword [ebx + 0x42d1d4]
cmp esi, 2
jne 0x40b440
mov dword [edi + 0x18], esi
push dword [ebx + 0x42d1d8]
lea ecx, [edi + 0x38]
call fcn.00402420
cmp dword [edi + 0x10], 0
je 0x40b458
xor esi, esi
jmp 0x40b47d
push dword [edi]
push 1
push esi
push dword [ebx + 0x42d1d0]
call dword [sym.imp.MSVCR110.dll_fwrite]
add esp, 0x10
cmp eax, 1
sete al
mov byte [ebp - 0x41], al
test al, al
je 0x40b22f
lea ebx, [edi + 0x20]
test byte [edi + 4], 0x40
je 0x40b48e
mov eax, dword [edi + 0x10]
mov dword [edi + 0x14], eax
jmp 0x40b491
mov dword [edi + 0x14], esi
test esi, esi
je 0x40b4b6
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0
push ecx
mov eax, esp
push ecx
mov ecx, esp
mov dword [eax], 0
push ebx
mov dword [ecx], 0x421998
call fcn.0040ee90
add esp, 0x18
mov al, byte [ebp - 0x41]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041abd2
mov esp, ebp
pop ebp
ret 4