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

Disassembly:
push 0xffffffffffffffff
push 0x56b588
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5c96a4]
xor eax, esp
push eax
lea eax, [esp + 0x44]
mov dword fs:[0], eax
mov edi, ecx
lea ebx, [edi + 0x18]
mov ecx, ebx
mov dword [esp + 0x24], ebx
call fcn.00406060
mov eax, dword [edi + 4]
mov ecx, 0x59fc8c
test al, 0x40
je 0x41d12a
mov ecx, 0x59fc94
jmp 0x41d133
test al, 0x20
je 0x41d133
mov ecx, 0x59fc9c
mov eax, dword [esp + 0x54]
push ecx
xor ebp, ebp
push eax
mov dword [edi], ebp
call fcn.005405d0
add esp, 8
mov dword [edi], eax
cmp eax, ebp
jne 0x41d1a2
lea ecx, [esp + 0x20]
push ecx
call fcn.0041ac30
add esp, 4
push eax
mov ecx, ebx
mov dword [esp + 0x50], ebp
call fcn.0040bbf0
mov dword [esp + 0x4c], 0xffffffff
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x41d18c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
mov ecx, dword [edi + 4]
mov byte [esp + 0x1b], 1
test cl, 0x10
je 0x41d392
push 2
push ebp
push eax
call fcn.005408fd
mov ecx, dword [edi]
push ecx
call fcn.00540b1f
mov edx, dword [edi]
push ebp
push ebp
push edx
mov dword [edi + 8], eax
call fcn.005408fd
mov eax, dword [edi + 8]
mov esi, 0x400
add esp, 0x1c
cmp eax, esi
jge 0x41d1ea
mov esi, eax
test esi, esi
je 0x41d3d9
push esi
call fcn.00441f14
mov ebx, eax
mov eax, dword [edi]
push eax
push 1
push esi
push ebx
mov dword [esp + 0x30], ebx
call fcn.005419d5
add esp, 0x14
cmp eax, 1
sete al
mov byte [esp + 0x1b], al
test al, al
je 0x41d380
and dword [edi + 4], 0xfffffffa
xor ecx, ecx
mov dword [edi + 0x10], 1
cmp dword [0x5cb698], ecx
je 0x41d29e
xor eax, eax
mov edi, edi
mov edx, dword [eax + 0x5cb69c]
test edx, edx
jle 0x41d25b
cmp ebp, esi
jge 0x41d25b
mov ebx, dword [esp + 0x1c]
mov edx, dword [eax + 0x5cb698]
mov bl, byte [ebx + ebp]
cmp bl, byte [edx + ebp]
mov edx, dword [eax + 0x5cb69c]
jne 0x41d25b
inc ebp
cmp ebp, edx
jl 0x41d23a
cmp ebp, edx
je 0x41d271
inc ecx
mov eax, ecx
xor ebp, ebp
shl eax, 4
cmp dword [eax + 0x5cb698], ebp
jne 0x41d230
jmp 0x41d29a
shl ecx, 4
mov eax, dword [ecx + 0x5cb6a4]
or eax, dword [edi + 4]
sub dword [edi + 8], ebp
mov dword [edi + 4], eax
cmp ebp, 2
jne 0x41d28b
mov dword [edi + 0x10], ebp
mov ecx, dword [ecx + 0x5cb6a0]
push ecx
lea ecx, [edi + 0x1c]
call fcn.004061c0
mov ebx, dword [esp + 0x1c]
cmp esi, ebp
jle 0x41d2b0
mov edx, dword [edi]
push 0
push ebp
push edx
call fcn.005408fd
add esp, 0xc
test ebp, ebp
jne 0x41d365
lea ecx, [esp + 0x1c]
call fcn.00403c90
push esi
push ebx
push ecx
mov dword [esp + 0x58], 1
mov eax, esp
mov dword [esp + 0x2c], esp
push ecx
mov dword [eax], str.UTF_8
mov eax, esp
mov dword [eax], str.UTF_16
lea eax, [esp + 0x38]
mov dword [esp + 0x30], esp
push eax
call fcn.00419f70
push esi
lea ecx, [esp + 0x20]
mov byte [esp + 0x50], 2
call fcn.00403bf0
push eax
lea ecx, [esp + 0x2c]
push ecx
mov dword [esp + 0x40], esi
call fcn.0041ce00
add esp, 8
push eax
lea ecx, [esp + 0x20]
call fcn.0041dd60
mov edx, dword [esp + 0x1c]
push ecx
mov eax, esp
mov dword [esp + 0x24], esp
mov dword [eax], edx
lea eax, [esp + 0x24]
push eax
call fcn.0041a8e0
add esp, 8
lea ecx, [edi + 0x1c]
push eax
mov byte [esp + 0x50], 3
call fcn.0040bbf0
lea ecx, [esp + 0x20]
call fcn.0041a0e0
lea esi, [esp + 0x28]
call fcn.0041d4b0
lea ecx, [esp + 0x1c]
mov dword [esp + 0x4c], 0xffffffff
call fcn.0041a0e0
mov edx, dword [edi + 0x1c]
cmp dword [edx - 0xc], 0
lea ecx, [edi + 0x1c]
jne 0x41d380
cmp byte [ebx], 0x3c
jne 0x41d380
push str.UTF_8
call fcn.004061c0
push ebx
call fcn.00441f1f
mov ebx, dword [esp + 0x28]
add esp, 4
jmp 0x41d460
test cl, 0x20
je 0x41d3d9
mov dword [edi + 0x10], 1
test cl, 0x40
je 0x41d3af
push eax
call fcn.00540b1f
add esp, 4
mov dword [edi + 8], eax
cmp dword [edi + 8], ebp
jne 0x41d3d9
xor ecx, ecx
cmp dword [0x5cb698], ebp
je 0x41d3d9
mov edx, dword [edi + 4]
xor eax, eax
test dword [eax + 0x5cb6a4], edx
jne 0x41d421
inc ecx
mov eax, ecx
shl eax, 4
cmp dword [eax + 0x5cb698], ebp
jne 0x41d3c3
mov ecx, dword [edi + 0x1c]
add edi, 0x1c
cmp dword [ecx - 0xc], 0
je 0x41d409
push edi
mov ecx, ebx
call fcn.0040bbf0
test ebp, ebp
je 0x41d3fd
push str._BOM_
mov ecx, ebx
call fcn.0041dfc0
push 0x59f8a0
mov ecx, ebx
call fcn.0041dfc0
mov al, byte [esp + 0x1b]
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
shl ecx, 4
mov esi, ecx
mov ebp, dword [esi + 0x5cb69c]
cmp ebp, 2
jne 0x41d443
mov dword [edi + 0x10], ebp
mov eax, dword [esi + 0x5cb6a0]
push eax
lea ecx, [edi + 0x1c]
call fcn.004061c0
mov ecx, dword [edi]
mov edx, dword [esi + 0x5cb698]
push ecx
push 1
push ebp
push edx
call fcn.00541b54
add esp, 0x10
cmp eax, 1
sete byte [esp + 0x1b]
cmp byte [esp + 0x1b], 0
jne 0x41d3d9
lea eax, [esp + 0x24]
push eax
call fcn.0041ac30
add esp, 4
push eax
mov ecx, ebx
mov dword [esp + 0x50], 4
call fcn.0040bbf0
mov dword [esp + 0x4c], 0xffffffff
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x41d180