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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x603371
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x70f200]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [ebp + 0x10]
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x2c], eax
mov eax, dword [edi]
cmp eax, 0xffffffff
je 0x5e4167
test eax, eax
je 0x5e4167
push ecx
call fcn.005e36a0
mov eax, dword [ebp + 0xc]
mov dword [edi + 4], eax
test al, 8
je 0x5e41f9
push 1
xorps xmm0, xmm0
mov dword [ebp - 0x20], 0
push ebx
lea ecx, [ebp - 0x28]
movq qword [ebp - 0x28], xmm0
call fcn.005dc570
push 0
push 1
push 1
push 0
push 0x624284
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 0
call fcn.005daa70
test eax, eax
je 0x5e41ea
push 0
lea ecx, [ebp - 0x28]
call fcn.005dbed0
mov ecx, eax
call fcn.005dc3a0
cmp eax, 2
jle 0x5e41ea
lea ecx, [ebp - 0x28]
call fcn.005dc190
or edx, 0xffffffff
mov ecx, eax
call fcn.005e0f30
test al, al
jne 0x5e41ea
lea ecx, [ebp - 0x28]
call fcn.005dc430
xor eax, eax
jmp 0x5e445a
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 0xffffffff
call fcn.005dc430
mov eax, dword [edi + 4]
mov edx, SysReAllocString
mov esi, eax
mov dword [ebp - 0x34], 0xc0000000
shr esi, 2
mov ecx, eax
not esi
mov dword [ebp - 0x1c], 0
and esi, 1
and ecx, 3
push 0
cmovne edx, dword [ebp - 0x34]
test al, 2
push dword [ebp - 0x2c]
mov eax, 0
mov dword [ebp - 0x34], 3
sete al
test ecx, ecx
lea eax, [eax*2 + 2]
cmove eax, dword [ebp - 0x34]
push eax
push 0
push esi
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov eax, dword [edi]
cmp eax, 0xffffffff
je 0x5e4265
test eax, eax
je 0x5e4265
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi], esi
test esi, esi
jne 0x5e427e
push ecx
mov ecx, edi
mov dword [edi], 0xffffffff
call fcn.005e36a0
jmp 0x5e445a
cmp esi, 0xffffffff
jne 0x5e4290
push ecx
mov ecx, edi
call fcn.005e36a0
jmp 0x5e445a
mov ecx, edi
call fcn.005e46f0
mov ebx, dword [edi + 4]
mov esi, eax
mov eax, edx
mov dword [ebp - 0x34], eax
test bl, 0x10
je 0x5e42bf
test bl, 1
je 0x5e4458
push 0
push eax
push esi
mov ecx, edi
call fcn.005e36d0
jmp 0x5e4458
test esi, esi
jne 0x5e4362
test eax, eax
jne 0x5e4362
test bl, 0xe0
setne cl
test bl, 3
setne al
test al, cl
je 0x5e4458
and ebx, 0x80
lea ecx, [ebp - 0x30]
or ebx, 0x100
xorps xmm0, xmm0
shr ebx, 7
push ebx
movlpd qword [ebp - 0x30], xmm0
call fcn.00403a80
mov eax, dword [edi + 4]
mov esi, dword [ebp - 0x30]
test al, al
jns 0x5e4318
mov word [esi], 0xbbef
mov byte [esi + 2], 0xbf
jmp 0x5e432c
test al, 0x20
je 0x5e4323
mov word [esi], 0xfeff
jmp 0x5e432c
test al, 0x40
je 0x5e432c
mov word [esi], 0xfffe
push 0
lea eax, [ebp - 0x1c]
push eax
push ebx
push esi
push dword [edi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x5e434c
push ecx
mov ecx, edi
call fcn.005e36a0
mov edi, eax
jmp 0x5e434e
mov edi, dword [edi]
test esi, esi
je 0x5e435b
push esi
call fcn.0041e1c3
add esp, 4
mov eax, edi
jmp 0x5e445a
test bl, 2
jne 0x5e4458
push 0
lea eax, [ebp - 0x1c]
mov word [ebp - 0x18], 0
push eax
push 3
lea eax, [ebp - 0x18]
mov byte [ebp - 0x16], 0
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x5e4458
mov al, byte [ebp - 0x18]
xor ecx, ecx
cmp al, 0xff
jne 0x5e43b2
cmp byte [ebp - 0x17], 0xfe
jne 0x5e43f3
mov eax, dword [edi + 4]
mov ecx, 2
and eax, 0xfffffe3f
or eax, 0x20
jmp 0x5e43f0
cmp al, 0xfe
jne 0x5e43ce
cmp byte [ebp - 0x17], 0xff
jne 0x5e43f3
mov eax, dword [edi + 4]
mov ecx, 2
and eax, 0xfffffe5f
or eax, 0x40
jmp 0x5e43f0
cmp al, 0xef
jne 0x5e43f3
cmp byte [ebp - 0x17], 0xbb
jne 0x5e43f3
cmp byte [ebp - 0x16], 0xbf
jne 0x5e43f3
mov eax, dword [edi + 4]
mov ecx, 3
and eax, 0xfffffe9f
or eax, 0x80
mov dword [edi + 4], eax
mov eax, dword [edi + 4]
test al, 1
je 0x5e4448
test al, 0x60
mov ecx, edi
mov eax, dword [ebp - 0x34]
push 0
je 0x5e4432
sub esi, 2
sbb eax, 0
push eax
push esi
call fcn.005e36d0
mov ecx, edi
call fcn.005e4600
mov ecx, 0xffff
cmp cx, ax
jne 0x5e4458
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
mov ecx, edi
call fcn.005e36d0
jmp 0x5e4458
sub esi, 1
sbb eax, 0
push eax
push esi
call fcn.005e36d0
mov ecx, edi
call fcn.005e45a0
jmp 0x5e4458
cmp ecx, dword [ebp - 0x1c]
je 0x5e4458
push ecx
push 0
push ecx
mov ecx, edi
call fcn.005e3750
mov eax, dword [edi]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0041e1b5
mov esp, ebp
pop ebp
ret 0xc