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

Disassembly:
push 0x90
mov eax, 0x43aed7
call fcn.004385bc
mov edi, ecx
mov dword [ebp - 0x84], edi
lea esi, [edi + 0x20]
push 0
mov ecx, esi
call fcn.00405ea5
test byte [edi + 4], 0x40
mov ecx, 0x44ae38
je 0x419a05
mov eax, 0x44ae40
jmp 0x419a11
test byte [edi + 4], 0x20
mov eax, 0x44ae48
cmove eax, ecx
and dword [edi], 0
push eax
push dword [ebp + 8]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen]
pop ecx
pop ecx
mov ecx, eax
mov dword [edi], ecx
test ecx, ecx
jne 0x419a34
mov ecx, edi
call fcn.004198b5
jmp 0x419d7f
xor ebx, ebx
mov byte [ebp - 0x8c], 1
test byte [edi + 4], 0x10
mov dword [edi + 0x18], 1
je 0x419c9c
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
push 2
push ebx
push ecx
call esi
push dword [edi]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
push ebx
push ebx
push dword [edi]
mov dword [edi + 0x10], eax
call esi
mov esi, 0x400
add esp, 0x1c
mov dword [ebp - 0x90], esi
cmp dword [edi + 0x10], esi
jge 0x419a8f
mov esi, dword [edi + 0x10]
mov dword [ebp - 0x90], esi
test esi, esi
je 0x419d42
push esi
call fcn.004327fc
push dword [edi]
mov dword [ebp - 0x88], eax
push 1
push esi
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x14
dec eax
neg eax
sbb al, al
add al, 1
mov dword [ebp - 0x8c], eax
je 0x419c84
and dword [edi + 4], 0xfffffffa
xor edx, edx
mov dword [ebp - 0x94], edx
cmp dword [0x45b130], edx
je 0x419b72
xor eax, eax
mov dword [ebp - 0x98], eax
mov eax, dword [eax + 0x45b134]
xor ebx, ebx
mov dword [ebp - 0x9c], eax
test eax, eax
jle 0x419b2c
mov edi, dword [ebp - 0x98]
mov edx, dword [ebp - 0x88]
cmp ebx, esi
jge 0x419b20
mov ecx, dword [edi + 0x45b130]
mov al, byte [edx + ebx]
cmp al, byte [ebx + ecx]
jne 0x419b1a
mov eax, dword [edi + 0x45b134]
inc ebx
cmp ebx, eax
jl 0x419afb
jmp 0x419b20
mov eax, dword [ebp - 0x9c]
mov edi, dword [ebp - 0x84]
mov edx, dword [ebp - 0x94]
cmp ebx, eax
je 0x419b4e
inc edx
xor ebx, ebx
mov eax, edx
mov dword [ebp - 0x94], edx
shl eax, 4
mov dword [ebp - 0x98], eax
cmp dword [eax + 0x45b130], ebx
jne 0x419add
jmp 0x419b72
shl edx, 4
push 2
mov eax, dword [edx + 0x45b13c]
or dword [edi + 4], eax
pop eax
cmp ebx, eax
jne 0x419b64
mov dword [edi + 0x18], eax
push dword [edx + 0x45b138]
lea ecx, [edi + 0x38]
call fcn.004041b8
cmp esi, ebx
jle 0x419b84
push 0
push ebx
push dword [edi]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
add esp, 0xc
test ebx, ebx
jne 0x419c63
and dword [ebp - 0x18], ebx
xor eax, eax
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
and dword [ebp - 4], eax
push esi
push dword [ebp - 0x88]
push ecx
mov eax, esp
lea ecx, [ebp - 0x80]
mov dword [eax], str.UTF_8
call fcn.00418565
xor ecx, ecx
mov byte [ebp - 4], 1
push 2
pop edx
lea eax, [esi + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004327fc
pop ecx
push dword [ebp - 0x90]
lea ecx, [ebp - 0x28]
mov esi, eax
call fcn.00404507
mov eax, dword [ebp - 0x90]
push ecx
mov ecx, esp
mov dword [ebp - 0x48], eax
push esi
mov dword [ecx], str.UTF_16
lea ecx, [ebp - 0x80]
call fcn.00418782
push eax
push esi
lea ecx, [ebp - 0x28]
call fcn.00405894
push esi
call fcn.0043286e
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
mov ecx, esp
cmovae eax, dword [ebp - 0x28]
mov dword [ecx], eax
lea ecx, [ebp - 0x40]
call fcn.0041b9e5
pop ecx
push eax
lea ecx, [edi + 0x38]
call fcn.00405576
xor esi, esi
lea ecx, [ebp - 0x40]
push esi
push 1
call fcn.004069d5
push esi
push 1
lea ecx, [ebp - 0x68]
call fcn.004069d5
push esi
push 1
lea ecx, [ebp - 0x80]
call fcn.004069d5
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
push esi
push 1
call fcn.004069d5
jmp 0x419c65
xor esi, esi
cmp dword [edi + 0x48], esi
mov esi, dword [ebp - 0x88]
jne 0x419c8a
cmp byte [esi], 0x3c
jne 0x419c8a
push str.UTF_8
lea ecx, [edi + 0x38]
call fcn.004041b8
jmp 0x419c8a
mov esi, dword [ebp - 0x88]
push esi
call fcn.0043286e
mov eax, dword [ebp - 0x8c]
pop ecx
jmp 0x419d3a
test byte [edi + 4], 0x20
je 0x419d45
test byte [edi + 4], 0x40
push 2
pop eax
je 0x419cca
push eax
push 0
push ecx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
push dword [edi]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
add esp, 0x10
mov dword [edi + 0x10], eax
push 2
pop eax
xor esi, esi
cmp dword [0x45b130], ebx
je 0x419d42
mov edx, dword [edi + 4]
xor ecx, ecx
test dword [ecx + 0x45b13c], edx
jne 0x419cf1
inc esi
mov ecx, esi
shl ecx, 4
cmp dword [ecx + 0x45b130], ebx
jne 0x419cd9
jmp 0x419d42
shl esi, 4
mov ebx, dword [esi + 0x45b134]
cmp ebx, eax
jne 0x419d01
mov dword [edi + 0x18], eax
push dword [esi + 0x45b138]
lea ecx, [edi + 0x38]
call fcn.004041b8
cmp dword [edi + 0x10], 0
je 0x419d19
xor ebx, ebx
jmp 0x419d42
push dword [edi]
push 1
push ebx
push dword [esi + 0x45b130]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
dec eax
neg eax
sbb al, al
inc al
mov dword [ebp - 0x8c], eax
test al, al
je 0x419a28
lea esi, [edi + 0x20]
test byte [edi + 4], 0x40
je 0x419d53
mov eax, dword [edi + 0x10]
mov dword [edi + 0x14], eax
jmp 0x419d56
mov dword [edi + 0x14], ebx
test ebx, ebx
je 0x419d79
push 0xffffffffffffffff
push 0xffffffffffffffff
push ecx
mov eax, esp
xor edx, edx
push ecx
mov ecx, esi
and dword [eax], 0
mov eax, esp
mov dword [eax], 0x44ae50
call fcn.0041843a
add esp, 0x10
mov al, byte [ebp - 0x8c]
call fcn.00438566
ret 4