Function at 0x1005b73
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push esi
xor esi, esi
cmp dword [ebp + 8], 0xffffffff
mov dword [ebp - 4], esi
jne 0x1005bb0
mov eax, dword [section..data]
cmp byte [eax + 0x19], 3
jb 0x1005e48
push dword [ebp + 0xc]
push 0x100145c
push 0xd
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01003cc1
jmp 0x1005e48
lea ecx, [ebp - 0x2c]
call fcn.010066f5
lea eax, [ebp - 0x2c]
push eax
push dword [ebp + 0xc]
call fcn.010059a0
cmp eax, esi
jge 0x1005bec
mov ecx, dword [section..data]
cmp byte [ecx + 0x19], 3
jb 0x1005c30
push eax
push dword [ebp + 0xc]
push 0x100145c
push 0xe
push dword [ecx + 0x14]
push dword [ecx + 0x10]
call fcn.010054c3
jmp 0x1005c30
lea ecx, [ebp - 0x18]
call fcn.010066f5
push dword [ebp + 0x10]
lea ecx, [ebp - 0x18]
push dword [ebp - 0x28]
call fcn.01006be6
cmp eax, esi
jge 0x1005c3d
mov ecx, dword [section..data]
cmp byte [ecx + 0x19], 3
jb 0x1005c28
push eax
push dword [ebp - 0x28]
push 0x100145c
push 0xf
push dword [ecx + 0x14]
push dword [ecx + 0x10]
call fcn.01003c58
lea ecx, [ebp - 0x18]
call fcn.01006bd6
lea ecx, [ebp - 0x2c]
call fcn.01006bd6
jmp 0x1005e48
cmp byte [0x1008224], 0
push ebx
push edi
jne 0x1005e07
push dword [ebp + 8]
mov dword [ebp + 0xc], esi
call dword [sym.imp.KERNEL32.dll_GetFileType]
test al, 2
push esi
je 0x1005cb4
lea eax, [ebp + 0xc]
push eax
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
test eax, eax
jge 0x1005e27
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jg 0x1005c88
call esi
jmp 0x1005c94
call esi
and eax, 0xffff
or eax, 0x80070000
mov ecx, dword [section..data]
cmp byte [ecx + 0x19], 3
jb 0x1005e27
push eax
push dword [ebp - 0x14]
push 0x100145c
push 0x10
jmp 0x1005dfa
push esi
push esi
push esi
push 0xffffffffffffffff
push dword [ebp - 0x14]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
call esi
mov edi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push eax
call edi
mov ebx, eax
test ebx, ebx
jne 0x1005d27
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jg 0x1005ce4
call esi
jmp 0x1005cf0
call esi
and eax, 0xffff
or eax, 0x80070000
mov ecx, dword [section..data]
cmp byte [ecx + 0x19], 3
jb 0x1005d12
push eax
push dword [ebp - 0x14]
push 0x100145c
push 0x11
push dword [ecx + 0x14]
push dword [ecx + 0x10]
call fcn.01003c58
lea ecx, [ebp - 0x18]
call fcn.01006bd6
lea ecx, [ebp - 0x2c]
call fcn.01006bd6
jmp 0x1005e46
push ebx
call sub.msvcrt.dll___2_YAPAXI_Z
mov dword [ebp - 4], eax
xor eax, eax
cmp dword [ebp - 4], eax
pop ecx
jne 0x1005d61
mov eax, dword [section..data]
cmp byte [eax + 0x19], 2
jb 0x1005e27
push 0x8007000e
push dword [ebp - 0x14]
push 0x100145c
push 0x12
push dword [eax + 0x14]
push dword [eax + 0x10]
jmp 0x1005e00
push eax
push eax
push ebx
push dword [ebp - 4]
push 0xffffffffffffffff
push dword [ebp - 0x14]
push eax
call esi
push eax
call edi
test eax, eax
jne 0x1005daf
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jg 0x1005d86
call esi
jmp 0x1005d92
call esi
and eax, 0xffff
or eax, 0x80070000
mov ecx, dword [section..data]
cmp byte [ecx + 0x19], 3
jb 0x1005e27
push eax
push dword [ebp - 0x14]
push 0x100145c
push 0x13
jmp 0x1005dfa
push 0
lea eax, [ebp + 0xc]
push eax
dec ebx
push ebx
push dword [ebp - 4]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jge 0x1005e27
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jg 0x1005dd7
call esi
jmp 0x1005de3
call esi
and eax, 0xffff
or eax, 0x80070000
mov ecx, dword [section..data]
cmp byte [ecx + 0x19], 3
jb 0x1005e27
push eax
push dword [ebp - 0x14]
push 0x100145c
push 0x14
push dword [ecx + 0x14]
push dword [ecx + 0x10]
call fcn.01003c58
jmp 0x1005e27
mov eax, dword [section..data]
cmp byte [eax + 0x19], 5
jb 0x1005e27
push dword [ebp - 0x14]
push 0x100145c
push 0x15
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01003bf5
lea ecx, [ebp - 0x18]
call fcn.01006bd6
lea ecx, [ebp - 0x2c]
call fcn.01006bd6
cmp dword [ebp - 4], 0
je 0x1005e46
push dword [ebp - 4]
call sub.msvcrt.dll___3_YAXPAX_Z
pop ecx
pop edi
pop ebx
pop esi
leave
ret 0xc