Function at 0x5d2890
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
mov eax, 0x4138
call fcn.006c9620
mov esi, ecx
mov ecx, dword [ebp + 0x14]
mov edi, dword [ebp + 8]
mov eax, dword [0x7a8498]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov ebx, 0x10000
lea eax, [ecx - 1]
cmp eax, 2
jae 0x5d2950
cmp dword [esi + 4], 0xffffffff
je 0x5d28d3
push dword [esi]
call fcn.005d16f1
add esp, 4
mov dword [esi + 4], 0xffffffff
mov eax, dword [esi]
cmp dword [eax + 4], edi
jle 0x5d2bdf
mov ecx, dword [eax + 0x10]
cmp ecx, edi
jle 0x5d28fa
push eax
call fcn.005d1662
add esp, 4
mov eax, dword [esi]
mov ecx, dword [eax + 0x10]
cmp ecx, edi
jge 0x5d290e
push eax
call fcn.005d1b04
add esp, 4
mov eax, dword [esi]
cmp dword [eax + 0x10], edi
jl 0x5d28fe
lea ebx, [ebp - 0x13c]
push 0x12c
push 0xff
push ebx
call fcn.006ccfc0
add esp, 0xc
mov ecx, esi
push ebx
push edi
call fcn.005d233c
mov eax, dword [ebx + 0x108]
test al, 0x10
jne 0x5d29f5
cmp dword [ebp + 0x14], 1
jne 0x5d2a3c
mov eax, dword [ebp + 0xc]
jmp 0x5d2b2c
cmp ecx, 3
jne 0x5d2bdf
mov eax, dword [esi + 4]
cmp eax, edi
je 0x5d29b6
cmp eax, 0xffffffff
je 0x5d296f
push dword [esi]
call fcn.005d16f1
add esp, 4
mov dword [esi + 4], 0xffffffff
mov eax, dword [esi]
cmp dword [eax + 4], edi
jle 0x5d2bdf
mov ecx, dword [eax + 0x10]
cmp ecx, edi
jle 0x5d2996
push eax
call fcn.005d1662
add esp, 4
mov eax, dword [esi]
mov ecx, dword [eax + 0x10]
cmp ecx, edi
jge 0x5d29aa
push eax
call fcn.005d1b04
add esp, 4
mov eax, dword [esi]
cmp dword [eax + 0x10], edi
jl 0x5d299a
push eax
call fcn.005d1f41
add esp, 4
mov dword [esi + 4], edi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [esi]
call fcn.005d206c
add esp, 0xc
mov ebx, 0x600
test eax, eax
jg 0x5d2bdf
mov edi, eax
push dword [esi]
call fcn.005d16f1
add esp, 4
mov dword [esi + 4], 0xffffffff
test edi, edi
mov ebx, 0x5000000
cmove ebx, edi
jmp 0x5d2bdf
xor ebx, ebx
cmp dword [ebp + 0x14], 1
je 0x5d2bdf
lea edi, [ebp - 0x413c]
push 0x208
push 0xff
push edi
call fcn.006ccfc0
add esp, 0xc
lea ecx, [ebp - 0x138]
mov edx, edi
call fcn.005d2bf8
add esi, 0x138
push edi
push esi
call fcn.005d27af
add esp, 8
jmp 0x5d2bdf
mov edi, dword [ebp + 0xc]
lea ecx, [edi + 2]
mov ebx, edi
movzx edx, word [ecx - 2]
cmp dx, 0x2f
je 0x5d2a5b
cmp dx, 0x5c
je 0x5d2a5b
test dx, dx
jne 0x5d2a5d
jmp 0x5d2a62
mov ebx, ecx
add ecx, 2
jmp 0x5d2a44
sub ebx, edi
je 0x5d2b08
lea edi, [ebp - 0x413c]
push 0x208
push 0xff
push edi
call fcn.006ccfc0
add esp, 0xc
push dword [ebp + 0xc]
push edi
call fcn.006e7104
add esp, 8
mov word [ebx + edi - 2], 0
xor ecx, ecx
inc ecx
movzx eax, word [ebp - 0x413c]
cmp ax, 0x2f
je 0x5d2ab9
cmp ax, 0x5c
je 0x5d2ab9
xor ecx, ecx
cmp word [ebp - 0x413a], 0x3a
sete cl
mov dword [ebp - 0x4144], ecx
push 0x7560d0
push edi
call fcn.006cd766
add esp, 8
mov ebx, eax
push 0x7560d8
push edi
call fcn.006cd766
add esp, 8
xor ecx, ecx
or eax, ebx
setne cl
or ecx, dword [ebp - 0x4144]
jne 0x5d2b02
lea eax, [esi + 0x138]
lea ecx, [ebp - 0x413c]
push ecx
push eax
call fcn.005d27af
add esp, 8
mov eax, dword [ebp - 0x34]
mov edi, dword [ebp + 0xc]
sub esp, 0x1c
mov dword [esp + 0x14], eax
movaps xmm0, xmmword [0x732c70]
movups xmmword [esp + 4], xmm0
mov dword [esp], edi
mov dword [esp + 0x18], 0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
je 0x5d2b9c
mov ebx, eax
push dword [esi]
call fcn.005d1f41
add esp, 4
lea edi, [ebp - 0x413c]
push 0x4000
push 0xff
push edi
call fcn.006ccfc0
add esp, 0xc
push 0x4000
push edi
push dword [esi]
call fcn.005d206c
add esp, 0xc
test eax, eax
js 0x5d2b8c
je 0x5d2ba3
mov dword [ebp - 0x4140], 0xffffffff
push 0
lea ecx, [ebp - 0x4140]
push ecx
push eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x5d2b56
mov edi, ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov ebx, 0x400
jmp 0x5d2bc6
mov ebx, 0x200
jmp 0x5d2bdf
mov edi, ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileType]
xor ebx, ebx
cmp eax, 1
jne 0x5d2bc6
lea eax, [ebp - 0x20]
lea ecx, [ebp - 0x30]
lea edx, [ebp - 0x28]
push eax
push ecx
push edx
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
mov eax, dword [ebp + 0x14]
cmp eax, 1
je 0x5d2bd5
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esi]
call fcn.005d16f1
add esp, 4
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.006c9121
mov eax, ebx
add esp, 0x4138
pop esi
pop edi
pop ebx
pop ebp
ret 0x10