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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56f275
mov eax, dword fs:[0]
push eax
sub esp, 0x88
mov eax, dword [0x5e8464]
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 - 0x70], edi
lea ebx, [edi + 0x20]
mov dword [ebx + 0x10], 0
mov eax, ebx
cmp dword [ebx + 0x14], 8
jb 0x40e2d7
mov eax, dword [ebx]
xor ecx, ecx
mov word [eax], cx
mov ecx, 0x5d1760
mov eax, dword [edi + 4]
test al, 0x40
je 0x40e2ef
mov eax, 0x5d1768
jmp 0x40e2f9
test al, 0x20
mov eax, 0x5d1770
cmove eax, ecx
push eax
push dword [ebp + 8]
mov dword [edi], 0
call fcn.0054b1e0
add esp, 8
mov dword [edi], eax
test eax, eax
jne 0x40e31d
mov ecx, edi
call fcn.0040e050
jmp 0x40e6f4
mov ecx, dword [edi + 4]
xor esi, esi
mov byte [ebp - 0x69], 1
mov dword [edi + 0x18], 1
test cl, 0x10
je 0x40e5fa
push 2
push esi
push eax
call fcn.0054adcb
push dword [edi]
call fcn.005499cb
push esi
push esi
push dword [edi]
mov dword [edi + 0x10], eax
call fcn.0054adcb
mov eax, dword [edi + 0x10]
mov ebx, 0x400
add esp, 0x1c
mov dword [ebp - 0x78], ebx
cmp eax, ebx
jge 0x40e371
mov ebx, eax
mov dword [ebp - 0x78], ebx
test ebx, ebx
je 0x40e6b8
push ebx
call fcn.0053efea
push dword [edi]
mov dword [ebp - 0x74], eax
push 1
push ebx
push eax
call fcn.0054b3f4
add esp, 0x14
cmp eax, 1
sete byte [ebp - 0x69]
jne 0x40e5e6
and dword [edi + 4], 0xfffffffa
xor ecx, ecx
mov dword [ebp - 0x7c], ecx
cmp dword [0x5edbc8], ecx
je 0x40e43c
xor edx, edx
nop dword [eax]
mov ebx, dword [edx + 0x5edbcc]
xor esi, esi
test ebx, ebx
jle 0x40e3e0
mov edi, dword [ebp - 0x78]
nop
cmp esi, edi
jge 0x40e3da
mov eax, dword [ebp - 0x74]
mov ecx, dword [edx + 0x5edbc8]
mov al, byte [eax + esi]
cmp al, byte [esi + ecx]
jne 0x40e3da
inc esi
cmp esi, ebx
jl 0x40e3c0
mov edi, dword [ebp - 0x70]
mov ecx, dword [ebp - 0x7c]
cmp esi, ebx
je 0x40e3f9
inc ecx
xor esi, esi
mov edx, ecx
mov dword [ebp - 0x7c], ecx
shl edx, 4
cmp dword [edx + 0x5edbc8], esi
jne 0x40e3b0
jmp 0x40e439
shl ecx, 4
mov eax, dword [ecx + 0x5edbd4]
or dword [edi + 4], eax
cmp esi, 2
jne 0x40e40d
mov dword [edi + 0x18], esi
mov edx, dword [ecx + 0x5edbd0]
mov ecx, edx
lea ebx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40e420
sub ecx, ebx
sar ecx, 1
push ecx
push edx
lea ecx, [edi + 0x38]
call fcn.004065c0
mov ebx, dword [ebp - 0x78]
cmp ebx, esi
jle 0x40e44d
push 0
push esi
push dword [edi]
call fcn.0054adcb
add esp, 0xc
test esi, esi
jne 0x40e5b8
xor eax, eax
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
push ebx
push dword [ebp - 0x74]
mov dword [ebp - 4], eax
push ecx
mov eax, esp
lea ecx, [ebp - 0x68]
mov dword [eax], str.UTF_8
call fcn.0040c880
xor ecx, ecx
mov byte [ebp - 4], 1
lea eax, [ebx + 1]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0053efea
add esp, 4
mov dword [ebp - 0x70], eax
cmp dword [ebp - 0x14], ebx
jge 0x40e4b1
push ebx
lea ecx, [ebp - 0x28]
call fcn.004141d0
push ecx
mov eax, esp
mov dword [ebp - 0x30], ebx
mov ebx, dword [ebp - 0x70]
lea ecx, [ebp - 0x68]
push ebx
mov dword [eax], str.UTF_16
call fcn.0040cb70
push eax
push ebx
push dword [ebp - 0x18]
lea ecx, [ebp - 0x28]
push 0
call fcn.00414350
push ebx
call fcn.0053edaa
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
mov ecx, esp
cmovae eax, dword [ebp - 0x28]
mov dword [ecx], eax
lea ecx, [ebp - 0x94]
call fcn.00410e70
add esp, 4
lea ecx, [edi + 0x38]
push eax
call fcn.0040c2e0
mov edx, dword [ebp - 0x80]
cmp edx, 8
jb 0x40e541
mov ecx, dword [ebp - 0x94]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40e537
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40e712
push edx
push ecx
call fcn.0053efdc
add esp, 8
xor eax, eax
mov dword [ebp - 0x84], 0
lea ecx, [ebp - 0x68]
mov dword [ebp - 0x80], 7
mov word [ebp - 0x94], ax
call fcn.0040e720
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x40e5a4
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40e59a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40e717
push edx
push ecx
call fcn.0053efdc
add esp, 8
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
cmp dword [edi + 0x48], 0
mov ebx, dword [ebp - 0x74]
jne 0x40e5e9
cmp byte [ebx], 0x3c
jne 0x40e5e9
push 5
push str.UTF_8
lea ecx, [edi + 0x38]
call fcn.004065c0
push ebx
call fcn.0053edaa
mov al, byte [ebp - 0x69]
add esp, 4
jmp 0x40e6b0
mov ebx, dword [ebp - 0x74]
push ebx
call fcn.0053edaa
mov al, byte [ebp - 0x69]
add esp, 4
jmp 0x40e6b0
test cl, 0x20
je 0x40e6bb
test cl, 0x40
je 0x40e61f
push 2
push 0
push eax
call fcn.0054adcb
push dword [edi]
call fcn.005499cb
add esp, 0x10
mov dword [edi + 0x10], eax
xor ebx, ebx
cmp dword [0x5edbc8], ebx
je 0x40e6b8
mov ecx, dword [edi + 4]
xor eax, eax
test dword [eax + 0x5edbd4], ecx
jne 0x40e64a
inc ebx
mov eax, ebx
shl eax, 4
cmp dword [eax + 0x5edbc8], esi
jne 0x40e632
jmp 0x40e6b8
shl ebx, 4
mov esi, dword [ebx + 0x5edbcc]
cmp esi, 2
jne 0x40e65b
mov dword [edi + 0x18], esi
mov edx, dword [ebx + 0x5edbd0]
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x70], eax
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40e670
sub ecx, dword [ebp - 0x70]
sar ecx, 1
push ecx
push edx
lea ecx, [edi + 0x38]
call fcn.004065c0
cmp dword [edi + 0x10], 0
je 0x40e694
xor esi, esi
jmp 0x40e6b8
push dword [edi]
push 1
push esi
push dword [ebx + 0x5edbc8]
call fcn.0054b005
add esp, 0x10
cmp eax, 1
sete al
mov byte [ebp - 0x69], al
test al, al
je 0x40e311
lea ebx, [edi + 0x20]
test byte [edi + 4], 0x40
je 0x40e6c6
mov eax, dword [edi + 0x10]
jmp 0x40e6c8
mov eax, esi
mov dword [edi + 0x14], eax
test esi, esi
je 0x40e6f1
push 0xffffffffffffffff
push 0xffffffffffffffff
push ecx
mov eax, esp
xor edx, edx
push ecx
mov esi, esp
mov ecx, ebx
mov dword [eax], 0
mov dword [esi], 0x5d1778
call fcn.0040c670
add esp, 0x10
mov al, byte [ebp - 0x69]
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.0053ed9c
mov esp, ebp
pop ebp
ret 4
call fcn.00549186
call fcn.00549186
int3