Function at 0x1005f5fe
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x65c
mov eax, dword [0x100e03e0]
xor eax, esp
mov dword [esp + 0x658], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, ecx
cmp dword [ebx + 4], 0xffffffff
push esi
push edi
mov dword [esp + 0x10], ebx
mov dword [esp + 0x18], eax
je 0x1005f635
mov edi, dword [ebx]
call fcn.1005ee44
mov esi, dword [ebx]
mov edi, dword [ebp + 8]
or dword [ebx + 4], 0xffffffff
cmp edi, dword [esi + 4]
jl 0x1005f64d
mov eax, 0x10000
jmp 0x1005f8b5
cmp edi, dword [esi + 0x10]
jge 0x1005f660
call fcn.1005e87d
jmp 0x1005f660
mov esi, dword [ebx]
call fcn.1005e8b3
mov eax, dword [ebx]
cmp dword [eax + 0x10], edi
jl 0x1005f659
push edi
mov edi, dword [esp + 0x14]
lea ebx, [esp + 0x24]
mov ecx, edi
call fcn.1005eff6
test byte [esp + 0x22c], 0x10
je 0x1005f6bb
mov ecx, dword [esp + 0x18]
movzx eax, word [ecx]
cmp ax, 0x2f
je 0x1005f6a0
cmp ax, 0x5c
je 0x1005f6a0
test ax, ax
je 0x1005f6a5
cmp word [ecx + 2], 0x3a
jne 0x1005f6a5
push ecx
push 0
jmp 0x1005f6ad
push ecx
add edi, 0x244
push edi
call fcn.1005f4fa
pop ecx
pop ecx
xor eax, eax
jmp 0x1005f8b5
mov esi, dword [esp + 0x18]
movzx eax, word [esi]
test ax, ax
mov ebx, esi
mov ecx, esi
je 0x1005f6e7
movzx eax, ax
cmp ax, 0x2f
je 0x1005f6da
cmp ax, 0x5c
jne 0x1005f6dd
lea ebx, [ecx + 2]
inc ecx
inc ecx
movzx eax, word [ecx]
test ax, ax
jne 0x1005f6ce
push 0x103
lea eax, [esp + 0x254]
push esi
push eax
call fcn.10072563
add esp, 0xc
cmp ebx, esi
jne 0x1005f773
and word [esp + 0x250], 0
push ebx
lea eax, [esp + 0x254]
push eax
lea esi, [edi + 0x244]
push esi
lea eax, [esp + 0x464]
push str._s_s_s
push eax
call fcn.10072f35
add esp, 0x14
lea eax, [esp + 0x250]
push eax
push esi
call fcn.1005f4fa
pop ecx
pop ecx
xor eax, eax
push eax
push dword [esp + 0x230]
push 2
push eax
push eax
push 0x40000000
lea eax, [esp + 0x470]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [esp + 0x18], eax
jne 0x1005f7e8
mov eax, 0x200
jmp 0x1005f8b5
mov eax, ebx
sub eax, esi
sar eax, 1
and word [esp + eax*2 + 0x250], 0
cmp word [esp + 0x250], 0x2f
je 0x1005f7b6
cmp word [esp + 0x250], 0x5c
je 0x1005f7b6
cmp word [esp + 0x250], 0
je 0x1005f70a
cmp word [esp + 0x252], 0x3a
jne 0x1005f70a
push ebx
lea eax, [esp + 0x254]
push eax
lea eax, [esp + 0x460]
push 0x100ce414
push eax
call fcn.10072f35
lea eax, [esp + 0x260]
push eax
push 0
call fcn.1005f4fa
add esp, 0x18
jmp 0x1005f73f
push dword [edi + 0x23c]
mov ebx, dword [edi]
call fcn.1005eac1
cmp dword [edi + 0x240], 0
pop ecx
mov esi, 0x4000
jne 0x1005f811
push esi
call fcn.1006e628
pop ecx
mov dword [edi + 0x240], eax
and dword [esp + 0x10], 0
lea eax, [esp + 0x17]
push eax
push dword [edi + 0x240]
mov eax, dword [edi]
mov ecx, esi
call fcn.1005ec0d
mov ebx, eax
cmp ebx, 0xffffff96
pop ecx
pop ecx
je 0x1005f86a
test ebx, ebx
jl 0x1005f860
jle 0x1005f855
push 0
lea eax, [esp + 0x20]
push eax
push ebx
push dword [edi + 0x240]
push dword [esp + 0x28]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1005f874
cmp byte [esp + 0x17], 0
jne 0x1005f87e
test ebx, ebx
jne 0x1005f816
mov dword [esp + 0x10], 0x5000000
jmp 0x1005f8a0
mov dword [esp + 0x10], 0x1000
jmp 0x1005f8a0
mov dword [esp + 0x10], 0x400
jmp 0x1005f8a0
lea eax, [esp + 0x240]
push eax
lea eax, [esp + 0x234]
push eax
lea eax, [esp + 0x240]
push eax
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [edi]
call fcn.1005ee44
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x664]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.1006f271
mov esp, ebp
pop ebp
ret 8