Function at 0x59f8f0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x654
mov eax, dword [0x70f200]
xor eax, esp
mov dword [esp + 0x650], eax
mov eax, dword [ebp + 0x14]
push ebx
push esi
mov esi, ecx
push edi
mov edi, dword [ebp + 0xc]
cmp eax, 3
je 0x59fbf5
cmp eax, 2
je 0x59f92c
cmp eax, 1
jne 0x59fc9d
cmp dword [esi + 4], 0xffffffff
je 0x59f939
mov ecx, dword [esi]
call fcn.005a0620
mov ecx, dword [esi]
mov ebx, dword [ebp + 8]
mov dword [esi + 4], 0xffffffff
cmp ebx, dword [ecx + 4]
jge 0x59fc9d
cmp ebx, dword [ecx + 0x10]
jge 0x59f958
call fcn.005a0da0
mov eax, dword [esi]
cmp dword [eax + 0x10], ebx
jge 0x59f96e
nop
mov ecx, eax
call fcn.005a0d40
mov eax, dword [esi]
cmp dword [eax + 0x10], ebx
jl 0x59f960
lea eax, [esp + 0x10]
mov ecx, esi
push eax
push ebx
call fcn.0059fef0
test byte [esp + 0x21c], 0x10
je 0x59f9d0
cmp dword [ebp + 0x14], 1
je 0x59f9b7
movzx eax, word [edi]
mov ecx, eax
cmp eax, 0x2f
je 0x59f9ae
cmp ecx, 0x5c
je 0x59f9ae
test cx, cx
je 0x59f9a6
cmp word [edi + 2], 0x3a
je 0x59f9ae
lea ecx, [esi + 0x244]
jmp 0x59f9b0
xor ecx, ecx
mov edx, edi
call fcn.0059fcf0
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x650]
xor ecx, esp
call fcn.0041e1b5
mov esp, ebp
pop ebp
ret 0x10
cmp dword [ebp + 0x14], 1
je 0x59faf4
movzx eax, word [edi]
mov ebx, edi
mov edx, edi
mov ecx, eax
test ax, ax
je 0x59fa0d
lea ecx, [edx + 2]
nop dword [eax + eax]
cmp ax, 0x2f
je 0x59f9fc
cmp ax, 0x5c
jne 0x59f9fe
mov ebx, ecx
movzx eax, word [edx + 2]
add edx, 2
add ecx, 2
test ax, ax
jne 0x59f9f0
push edi
lea eax, [esp + 0x24c]
push 0x104
push eax
call fcn.00422c3b
add esp, 0xc
cmp ebx, edi
jne 0x59fa33
xor eax, eax
mov word [esp + 0x248], ax
jmp 0x59fa73
mov eax, ebx
sub eax, edi
and eax, 0xfffffffe
cmp eax, 0x208
jae 0x59fce0
xor ecx, ecx
mov word [esp + eax + 0x248], cx
mov ax, word [esp + 0x248]
cmp ax, 0x2f
je 0x59fa9b
cmp ax, 0x5c
je 0x59fa9b
test ax, ax
je 0x59fa73
cmp word [esp + 0x24a], 0x3a
je 0x59fa9b
push ebx
lea eax, [esp + 0x24c]
push eax
lea edi, [esi + 0x244]
push edi
lea eax, [esp + 0x45c]
push str._s_s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x14
jmp 0x59fabc
push ebx
lea eax, [esp + 0x24c]
push eax
lea eax, [esp + 0x458]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
xor edi, edi
lea edx, [esp + 0x248]
mov ecx, edi
call fcn.0059fcf0
mov eax, dword [esp + 0x21c]
push 0
or eax, 0x80000000
push eax
push 2
push 0
push 0
push 0x40000000
lea eax, [esp + 0x468]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x59fb15
mov eax, 0x200
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x650]
xor ecx, esp
call fcn.0041e1b5
mov esp, ebp
pop ebp
ret 0x10
mov edx, dword [esi + 0x23c]
mov ecx, dword [esi]
call fcn.005a08f0
cmp dword [esi + 0x240], 0
jne 0x59fb3e
push 0x10000
call fcn.0041e7cf
add esp, 4
mov dword [esi + 0x240], eax
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [esi + 0x240]
lea eax, [esp + 0xf]
mov ecx, dword [esi]
push eax
push 0x10000
call fcn.005a0690
add esp, 8
cmp eax, 0xffffff96
je 0x59fbc3
cmp eax, 1
jl 0x59fbbc
push 0
lea ecx, [esp + 0x248]
mov dword [esp + 0x248], 0
push ecx
push eax
push dword [esi + 0x240]
push edi
call ebx
test eax, eax
je 0x59fbb5
cmp byte [esp + 0xf], 0
je 0x59fb44
lea eax, [esp + 0x230]
push eax
lea eax, [esp + 0x224]
push eax
lea eax, [esp + 0x230]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
xor ebx, ebx
jmp 0x59fbc8
mov ebx, 0x400
jmp 0x59fbc8
mov ebx, 0x5000000
jmp 0x59fbc8
mov ebx, 0x1000
cmp dword [ebp + 0x14], 1
je 0x59fbd5
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esi]
call fcn.005a0620
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x650]
xor ecx, esp
call fcn.0041e1b5
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [esi + 4]
mov ebx, dword [ebp + 8]
cmp ebx, eax
je 0x59fc4a
cmp eax, 0xffffffff
je 0x59fc0b
mov ecx, dword [esi]
call fcn.005a0620
mov ecx, dword [esi]
mov dword [esi + 4], 0xffffffff
cmp ebx, dword [ecx + 4]
jge 0x59fc9d
cmp ebx, dword [ecx + 0x10]
jge 0x59fc27
call fcn.005a0da0
mov ecx, dword [esi]
cmp dword [ecx + 0x10], ebx
jge 0x59fc3c
nop
call fcn.005a0d40
mov ecx, dword [esi]
cmp dword [ecx + 0x10], ebx
jl 0x59fc30
mov edx, dword [esi + 0x23c]
call fcn.005a08f0
mov dword [esi + 4], ebx
mov ecx, dword [esi]
lea eax, [esp + 0xf]
push eax
push dword [ebp + 0x10]
mov edx, edi
call fcn.005a0690
mov edi, eax
add esp, 8
test edi, edi
jg 0x59fc72
mov ecx, dword [esi]
call fcn.005a0620
mov dword [esi + 4], 0xffffffff
cmp byte [esp + 0xf], 0
jne 0x59f9b7
test edi, edi
jle 0x59fcb9
mov eax, 0x600
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x650]
xor ecx, esp
call fcn.0041e1b5
mov esp, ebp
pop ebp
ret 0x10
mov eax, 0x10000
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x650]
xor ecx, esp
call fcn.0041e1b5
mov esp, ebp
pop ebp
ret 0x10
cmp edi, 0xffffff96
mov ecx, 0x1000
pop edi
mov eax, 0x5000000
cmove eax, ecx
mov ecx, dword [esp + 0x658]
pop esi
pop ebx
xor ecx, esp
call fcn.0041e1b5
mov esp, ebp
pop ebp
ret 0x10
call fcn.0041e2f9
int3