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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x57d058
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push esi
push edi
mov eax, dword [0x5ef220]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x24], edi
lea eax, [edi + 0x20]
mov ecx, eax
mov dword [ebp - 0x28], eax
call fcn.0040f860
mov eax, dword [edi + 4]
mov ecx, 0x5ca550
test al, 0x40
je 0x41d0dd
mov eax, 0x5ca558
jmp 0x41d0e7
test al, 0x20
mov eax, 0x5ca560
cmove eax, ecx
push eax
push dword [ebp + 8]
mov dword [edi], 0
call fcn.0055a6f7
add esp, 8
mov dword [edi], eax
test eax, eax
je 0x41d394
mov ecx, dword [edi + 4]
mov bl, 1
xor esi, esi
mov byte [ebp - 0x11], bl
mov dword [edi + 0x18], 1
test cl, 0x10
je 0x41d2f4
push 2
push esi
push eax
call fcn.0055a865
add esp, 0xc
push dword [edi]
call fcn.0055ac78
add esp, 4
mov dword [edi + 0x10], eax
push esi
push esi
push dword [edi]
call fcn.0055a865
mov eax, dword [edi + 0x10]
mov ebx, 0x400
add esp, 0xc
mov dword [ebp - 0x1c], ebx
cmp eax, ebx
jge 0x41d15e
mov ebx, eax
mov dword [ebp - 0x1c], ebx
test ebx, ebx
je 0x41d33d
push ebx
call fcn.00430eb7
add esp, 4
mov dword [ebp - 0x18], eax
push dword [edi]
push 1
push ebx
push eax
call fcn.0055aea9
add esp, 0x10
cmp eax, 1
sete al
mov byte [ebp - 0x11], al
test al, al
je 0x41d2e0
and dword [edi + 4], 0xfffffffa
xor ecx, ecx
mov dword [ebp - 0x20], ecx
cmp dword [0x5f0670], ecx
je 0x41d20e
xor edx, edx
lea esp, [esp]
mov ebx, dword [edx + 0x5f0674]
test ebx, ebx
jle 0x41d1d0
mov edi, dword [ebp - 0x1c]
lea ecx, [ecx]
cmp esi, edi
jge 0x41d1ca
mov eax, dword [ebp - 0x18]
mov ecx, dword [edx + 0x5f0670]
mov al, byte [eax + esi]
cmp al, byte [esi + ecx]
jne 0x41d1ca
inc esi
cmp esi, ebx
jl 0x41d1b0
mov edi, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x20]
cmp esi, ebx
je 0x41d1e9
inc ecx
xor esi, esi
mov edx, ecx
mov dword [ebp - 0x20], ecx
shl edx, 4
cmp dword [edx + 0x5f0670], esi
jne 0x41d1a0
jmp 0x41d20b
shl ecx, 4
mov eax, dword [ecx + 0x5f067c]
or dword [edi + 4], eax
cmp esi, 2
jne 0x41d1fd
mov dword [edi + 0x18], esi
push dword [ecx + 0x5f0678]
lea ecx, [edi + 0x24]
call fcn.0040fb60
mov ebx, dword [ebp - 0x1c]
cmp ebx, esi
jle 0x41d21f
push 0
push esi
push dword [edi]
call fcn.0055a865
add esp, 0xc
test esi, esi
jne 0x41d2b1
lea ecx, [ebp - 0x1c]
call fcn.0040fc20
push ebx
push dword [ebp - 0x18]
mov dword [ebp - 4], esi
push ecx
mov eax, esp
lea ecx, [ebp - 0x40]
mov dword [eax], str.UTF_8
call fcn.0041b580
push ebx
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 1
call fcn.0040f9f0
push ecx
mov ecx, esp
mov dword [ebp - 0x30], ebx
push eax
mov dword [ecx], str.UTF_16
lea ecx, [ebp - 0x40]
call fcn.0041b8c0
push eax
lea ecx, [ebp - 0x1c]
call fcn.00422270
mov eax, dword [ebp - 0x1c]
push ecx
mov ecx, esp
mov dword [ecx], eax
lea ecx, [ebp - 0x24]
call fcn.0041f5e0
add esp, 4
lea ecx, [edi + 0x24]
mov byte [ebp - 4], 2
push eax
call fcn.0040f0a0
lea ecx, [ebp - 0x24]
call fcn.0040c5b0
lea ecx, [ebp - 0x40]
call fcn.00402740
lea ecx, [ebp - 0x1c]
mov dword [ebp - 4], 0xffffffff
call fcn.0040c5b0
mov eax, dword [edi + 0x24]
lea ecx, [edi + 0x24]
mov ebx, dword [ebp - 0x18]
cmp dword [eax - 0xc], 0
jne 0x41d2e3
cmp byte [ebx], 0x3c
jne 0x41d2e3
push str.UTF_8
call fcn.0040fb60
push ebx
call fcn.00430ec0
mov bl, byte [ebp - 0x11]
add esp, 4
jmp 0x41d390
mov ebx, dword [ebp - 0x18]
push ebx
call fcn.00430ec0
mov bl, byte [ebp - 0x11]
add esp, 4
jmp 0x41d390
test cl, 0x20
je 0x41d340
test cl, 0x40
je 0x41d318
push 2
push 0
push eax
call fcn.0055a865
add esp, 0xc
push dword [edi]
call fcn.0055ac78
add esp, 4
mov dword [edi + 0x10], eax
xor ebx, ebx
cmp dword [0x5f0670], ebx
je 0x41d33d
mov ecx, dword [edi + 4]
xor eax, eax
test dword [eax + 0x5f067c], ecx
jne 0x41d34e
inc ebx
mov eax, ebx
shl eax, 4
cmp dword [eax + 0x5f0670], esi
jne 0x41d327
mov bl, byte [ebp - 0x11]
test byte [edi + 4], 0x40
je 0x41d3af
mov eax, dword [edi + 0x10]
mov dword [edi + 0x14], eax
jmp 0x41d3b2
shl ebx, 4
mov esi, dword [ebx + 0x5f0674]
cmp esi, 2
jne 0x41d35f
mov dword [edi + 0x18], esi
push dword [ebx + 0x5f0678]
lea ecx, [edi + 0x24]
call fcn.0040fb60
cmp dword [edi + 0x10], 0
je 0x41d377
xor esi, esi
jmp 0x41d33d
push dword [edi]
push 1
push esi
push dword [ebx + 0x5f0670]
call fcn.0055b0ae
add esp, 0x10
cmp eax, 1
sete bl
test bl, bl
jne 0x41d340
mov ecx, edi
call fcn.0041ceb0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov dword [edi + 0x14], esi
test esi, esi
je 0x41d3d9
push 0xffffffffffffffff
push 0xffffffffffffffff
push ecx
mov eax, esp
xor edx, edx
push ecx
mov ecx, dword [ebp - 0x28]
mov esi, esp
mov dword [eax], 0
mov dword [esi], 0x5ca568
call fcn.0041b380
add esp, 0x10
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4