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

Disassembly:
push 0xffffffffffffffff
push 0x45240b
mov eax, dword fs:[0]
push eax
sub esp, 0x9c
mov eax, dword [0x4642d8]
xor eax, esp
mov dword [esp + 0x94], eax
push ebx
push ebp
push esi
mov eax, dword [0x4642d8]
xor eax, esp
push eax
lea eax, [esp + 0xac]
mov dword fs:[0], eax
lea esi, [edi + 0x20]
or eax, 0xffffffff
xor ebx, ebx
mov dword [esp + 0x20], esi
call fcn.00424840
mov eax, dword [edi + 4]
mov ecx, 0x45c538
test al, 0x40
je 0x41edae
mov ecx, 0x45c540
jmp 0x41edb7
test al, 0x20
je 0x41edb7
mov ecx, 0x45c548
mov eax, dword [esp + 0xbc]
push ecx
push eax
mov dword [edi], ebx
call fcn.00434eae
add esp, 8
mov dword [edi], eax
test eax, eax
jne 0x41eddb
push edi
call fcn.0041eb80
jmp 0x41f115
mov ecx, dword [edi + 4]
mov ebx, 1
xor ebp, ebp
mov dword [edi + 0x18], ebx
test cl, 0x10
je 0x41f022
push 2
push ebp
push eax
call fcn.004356a1
mov ecx, dword [edi]
add esp, 0xc
push ecx
call fcn.004355a9
mov edx, dword [edi]
add esp, 4
push ebp
push ebp
push edx
mov dword [edi + 0x10], eax
call fcn.004356a1
mov eax, dword [edi + 0x10]
mov esi, 0x400
add esp, 0xc
cmp eax, esi
jge 0x41ee2e
mov esi, eax
test esi, esi
je 0x41f0d1
push esi
call fcn.00431e44
mov ecx, dword [edi]
add esp, 4
push ecx
push ebx
push esi
push eax
mov dword [esp + 0x2c], eax
call fcn.004353ef
add esp, 0x10
cmp eax, ebx
sete al
mov byte [esp + 0x17], al
test al, al
je 0x41f010
and dword [edi + 4], 0xfffffffa
xor ecx, ecx
cmp dword [0x4658c0], ecx
je 0x41eed7
xor eax, eax
lea ebx, [ebx]
mov edx, dword [eax + 0x4658c4]
test edx, edx
jle 0x41ee9b
cmp ebp, esi
jge 0x41ee9b
mov ebx, dword [esp + 0x1c]
mov edx, dword [eax + 0x4658c0]
mov bl, byte [ebx + ebp]
cmp bl, byte [edx + ebp]
mov edx, dword [eax + 0x4658c4]
jne 0x41ee9b
inc ebp
cmp ebp, edx
jl 0x41ee7a
cmp ebp, edx
je 0x41eeb1
inc ecx
mov eax, ecx
xor ebp, ebp
shl eax, 4
cmp dword [eax + 0x4658c0], ebp
jne 0x41ee70
jmp 0x41eed7
shl ecx, 4
mov eax, dword [ecx + 0x4658cc]
or eax, dword [edi + 4]
mov dword [edi + 4], eax
cmp ebp, 2
jne 0x41eec8
mov dword [edi + 0x18], ebp
mov eax, dword [ecx + 0x4658c8]
lea edx, [edi + 0x3c]
push edx
call fcn.00424600
cmp esi, ebp
jle 0x41eee9
mov eax, dword [edi]
push 0
push ebp
push eax
call fcn.004356a1
add esp, 0xc
xor eax, eax
cmp ebp, eax
jne 0x41eff3
xor ecx, ecx
mov dword [esp + 0x58], 7
mov dword [esp + 0x54], eax
mov word [esp + 0x44], cx
mov edx, dword [esp + 0x1c]
push esi
push edx
push ecx
mov dword [esp + 0xc0], eax
mov eax, esp
mov dword [eax], str.UTF_8
lea eax, [esp + 0x68]
mov dword [esp + 0x24], esp
push eax
call fcn.0041d4a0
xor ecx, ecx
lea eax, [esi + 1]
mov edx, 2
mul edx
seto cl
mov byte [esp + 0xb4], 1
neg ecx
or ecx, eax
push ecx
call fcn.00431e44
add esp, 4
cmp dword [esp + 0x58], esi
mov ebx, eax
jge 0x41ef61
mov eax, esi
lea ecx, [esp + 0x40]
call fcn.00424a70
push ecx
mov eax, esp
mov dword [esp + 0xa0], esi
mov dword [esp + 0x1c], esp
mov dword [eax], str.UTF_16
push ebx
lea eax, [esp + 0x64]
push eax
call fcn.0041d7a0
mov ecx, dword [esp + 0x54]
push eax
push ebx
push ecx
lea esi, [esp + 0x4c]
call fcn.004248d0
push ebx
call fcn.004329b8
cmp dword [esp + 0x5c], 8
mov ecx, dword [esp + 0x48]
mov dword [esp + 0x1c], esp
mov eax, esp
jae 0x41efab
lea ecx, [esp + 0x48]
mov dword [eax], ecx
lea ecx, [esp + 0x28]
call fcn.00421820
add esp, 4
push 0xffffffffffffffff
push 0
lea ecx, [edi + 0x3c]
mov byte [esp + 0xbc], 2
call fcn.00424d20
lea esi, [esp + 0x24]
call fcn.00419fd0
lea esi, [esp + 0x5c]
call fcn.0041f140
lea esi, [esp + 0x40]
mov dword [esp + 0xb4], 0xffffffff
call fcn.00419fd0
cmp dword [edi + 0x50], 0
jne 0x41f010
mov edx, dword [esp + 0x1c]
cmp byte [edx], 0x3c
jne 0x41f010
lea eax, [edi + 0x3c]
push eax
mov eax, str.UTF_8
call fcn.00424600
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.004329b8
add esp, 4
jmp 0x41f0c2
test cl, 0x20
je 0x41f0d1
test cl, 0x40
je 0x41f04b
push 2
push 0
push eax
call fcn.004356a1
mov edx, dword [edi]
add esp, 0xc
push edx
call fcn.004355a9
add esp, 4
mov dword [edi + 0x10], eax
xor ecx, ecx
cmp dword [0x4658c0], ecx
je 0x41f0d1
mov edx, dword [edi + 4]
xor eax, eax
lea ebx, [ebx]
test dword [eax + 0x4658cc], edx
jne 0x41f079
add ecx, ebx
mov eax, ecx
shl eax, 4
cmp dword [eax + 0x4658c0], ebp
jne 0x41f060
jmp 0x41f0d1
shl ecx, 4
mov esi, ecx
mov ebp, dword [esi + 0x4658c4]
cmp ebp, 2
jne 0x41f08c
mov dword [edi + 0x18], ebp
lea eax, [edi + 0x3c]
push eax
mov eax, dword [esi + 0x4658c8]
call fcn.00424600
cmp dword [edi + 0x10], 0
je 0x41f0a5
xor ebp, ebp
jmp 0x41f0d1
mov ecx, dword [edi]
mov edx, dword [esi + 0x4658c0]
push ecx
push 1
push ebp
push edx
call fcn.00433348
add esp, 0x10
cmp eax, 1
sete byte [esp + 0x17]
cmp byte [esp + 0x17], 0
je 0x41edd0
mov bl, byte [esp + 0x17]
test byte [edi + 4], 0x40
je 0x41f0df
mov eax, dword [edi + 0x10]
mov dword [edi + 0x14], eax
jmp 0x41f0e2
mov dword [edi + 0x14], ebp
test ebp, ebp
je 0x41f113
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0
push ecx
mov eax, esp
mov dword [esp + 0x28], esp
push ecx
mov ecx, dword [esp + 0x34]
mov dword [eax], 0
mov eax, esp
mov dword [esp + 0x2c], esp
push ecx
mov dword [eax], 0x45c550
call fcn.0041d2d0
add esp, 0x18
mov al, bl
mov ecx, dword [esp + 0xac]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x94]
xor ecx, esp
call fcn.00432079
add esp, 0xa8
ret 4