Function at 0x4f5bb0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x69c
mov eax, dword [0x5bda40]
xor eax, ebp
mov dword [ebp - 8], eax
mov dword [ebp - 0x684], ecx
cmp dword [ebp + 0x14], 3
je 0x4f5be5
cmp dword [ebp + 0x14], 2
je 0x4f5be5
cmp dword [ebp + 0x14], 1
je 0x4f5be5
mov eax, 0x10000
jmp 0x4f624d
cmp dword [ebp + 0x14], 3
jne 0x4f5d42
mov eax, dword [ebp - 0x684]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax + 4]
je 0x4f5cb3
mov edx, dword [ebp - 0x684]
cmp dword [edx + 4], 0xffffffff
je 0x4f5c1e
mov eax, dword [ebp - 0x684]
mov ecx, dword [eax]
push ecx
call fcn.004f4a80
add esp, 4
mov edx, dword [ebp - 0x684]
mov dword [edx + 4], 0xffffffff
mov eax, dword [ebp - 0x684]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
cmp edx, dword [ecx + 4]
jl 0x4f5c45
mov eax, 0x10000
jmp 0x4f624d
mov eax, dword [ebp - 0x684]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
cmp edx, dword [ecx + 0x10]
jge 0x4f5c66
mov eax, dword [ebp - 0x684]
mov ecx, dword [eax]
push ecx
call fcn.004f4020
add esp, 4
mov edx, dword [ebp - 0x684]
mov eax, dword [edx]
mov ecx, dword [eax + 0x10]
cmp ecx, dword [ebp + 8]
jge 0x4f5c89
mov edx, dword [ebp - 0x684]
mov eax, dword [edx]
push eax
call fcn.004f4090
add esp, 4
jmp 0x4f5c66
mov ecx, dword [ebp - 0x684]
mov edx, dword [ecx + 0x23c]
push edx
mov eax, dword [ebp - 0x684]
mov ecx, dword [eax]
push ecx
call fcn.004f43d0
add esp, 8
mov edx, dword [ebp - 0x684]
mov eax, dword [ebp + 8]
mov dword [edx + 4], eax
lea ecx, [ebp - 0x241]
push ecx
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x684]
mov edx, dword [ecx]
push edx
call fcn.004f4660
add esp, 0x10
mov dword [ebp - 0x240], eax
cmp dword [ebp - 0x240], 0
jg 0x4f5d00
mov eax, dword [ebp - 0x684]
mov ecx, dword [eax]
push ecx
call fcn.004f4a80
add esp, 4
mov edx, dword [ebp - 0x684]
mov dword [edx + 4], 0xffffffff
movzx eax, byte [ebp - 0x241]
test eax, eax
je 0x4f5d12
xor eax, eax
jmp 0x4f624d
cmp dword [ebp - 0x240], 0
jle 0x4f5d25
mov eax, 0x600
jmp 0x4f624d
cmp dword [ebp - 0x240], 0xffffff96
jne 0x4f5d38
mov eax, 0x1000
jmp 0x4f624d
mov eax, 0x5000000
jmp 0x4f624d
mov ecx, dword [ebp - 0x684]
cmp dword [ecx + 4], 0xffffffff
je 0x4f5d5f
mov edx, dword [ebp - 0x684]
mov eax, dword [edx]
push eax
call fcn.004f4a80
add esp, 4
mov ecx, dword [ebp - 0x684]
mov dword [ecx + 4], 0xffffffff
mov edx, dword [ebp - 0x684]
mov eax, dword [edx]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax + 4]
jl 0x4f5d86
mov eax, 0x10000
jmp 0x4f624d
mov edx, dword [ebp - 0x684]
mov eax, dword [edx]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax + 0x10]
jge 0x4f5da7
mov edx, dword [ebp - 0x684]
mov eax, dword [edx]
push eax
call fcn.004f4020
add esp, 4
mov ecx, dword [ebp - 0x684]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
cmp eax, dword [ebp + 8]
jge 0x4f5dca
mov ecx, dword [ebp - 0x684]
mov edx, dword [ecx]
push edx
call fcn.004f4090
add esp, 4
jmp 0x4f5da7
lea eax, [ebp - 0x238]
push eax
mov ecx, dword [ebp + 8]
push ecx
mov ecx, dword [ebp - 0x684]
call fcn.004f4fb0
mov edx, dword [ebp - 0x2c]
and edx, 0x10
je 0x4f5e9d
cmp dword [ebp + 0x14], 1
jne 0x4f5df9
xor eax, eax
jmp 0x4f624d
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x248], eax
mov ecx, dword [ebp - 0x248]
movzx edx, word [ecx]
cmp edx, 0x2f
je 0x4f5e46
mov eax, dword [ebp - 0x248]
movzx ecx, word [eax]
cmp ecx, 0x5c
je 0x4f5e46
mov edx, dword [ebp - 0x248]
movzx eax, word [edx]
test eax, eax
je 0x4f5e3a
mov ecx, dword [ebp - 0x248]
movzx edx, word [ecx + 2]
cmp edx, 0x3a
je 0x4f5e46
mov dword [ebp - 0x688], 0
jmp 0x4f5e50
mov dword [ebp - 0x688], 1
mov al, byte [ebp - 0x688]
mov byte [ebp - 0x242], al
movzx ecx, byte [ebp - 0x242]
test ecx, ecx
je 0x4f5e7a
mov edx, dword [ebp - 0x248]
push edx
push 0
call fcn.004f5960
add esp, 8
jmp 0x4f5e96
mov eax, dword [ebp - 0x248]
push eax
mov ecx, dword [ebp - 0x684]
add ecx, 0x244
push ecx
call fcn.004f5960
add esp, 8
xor eax, eax
jmp 0x4f624d
cmp dword [ebp + 0x14], 1
jne 0x4f5eae
mov edx, dword [ebp + 0xc]
mov dword [ebp - 4], edx
jmp 0x4f60b2
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x250], eax
mov ecx, dword [ebp - 0x250]
mov dword [ebp - 0x254], ecx
mov edx, dword [ebp - 0x254]
mov dword [ebp - 0x66c], edx
mov eax, dword [ebp - 0x66c]
movzx ecx, word [eax]
test ecx, ecx
je 0x4f5f18
mov edx, dword [ebp - 0x66c]
movzx eax, word [edx]
cmp eax, 0x2f
je 0x4f5ef8
mov ecx, dword [ebp - 0x66c]
movzx edx, word [ecx]
cmp edx, 0x5c
jne 0x4f5f07
mov eax, dword [ebp - 0x66c]
add eax, 2
mov dword [ebp - 0x254], eax
mov ecx, dword [ebp - 0x66c]
add ecx, 2
mov dword [ebp - 0x66c], ecx
jmp 0x4f5ecf
mov edx, dword [ebp - 0x250]
mov dword [ebp - 0x68c], edx
lea eax, [ebp - 0x668]
mov dword [ebp - 0x690], eax
mov ecx, dword [ebp - 0x690]
mov dword [ebp - 0x694], ecx
mov edx, dword [ebp - 0x68c]
mov ax, word [edx]
mov word [ebp - 0x696], ax
mov ecx, dword [ebp - 0x690]
mov dx, word [ebp - 0x696]
mov word [ecx], dx
mov eax, dword [ebp - 0x68c]
add eax, 2
mov dword [ebp - 0x68c], eax
mov ecx, dword [ebp - 0x690]
add ecx, 2
mov dword [ebp - 0x690], ecx
cmp word [ebp - 0x696], 0
jne 0x4f5f3c
mov edx, dword [ebp - 0x254]
cmp edx, dword [ebp - 0x250]
jne 0x4f5f9d
xor eax, eax
mov word [ebp - 0x668], ax
jmp 0x4f5fb5
mov ecx, dword [ebp - 0x254]
sub ecx, dword [ebp - 0x250]
sar ecx, 1
xor edx, edx
mov word [ebp + ecx*2 - 0x668], dx
movzx eax, word [ebp - 0x668]
cmp eax, 0x2f
je 0x4f5ff0
movzx ecx, word [ebp - 0x668]
cmp ecx, 0x5c
je 0x4f5ff0
movzx edx, word [ebp - 0x668]
test edx, edx
je 0x4f5fe4
movzx eax, word [ebp - 0x666]
cmp eax, 0x3a
je 0x4f5ff0
mov dword [ebp - 0x69c], 0
jmp 0x4f5ffa
mov dword [ebp - 0x69c], 1
mov cl, byte [ebp - 0x69c]
mov byte [ebp - 0x249], cl
movzx edx, byte [ebp - 0x249]
test edx, edx
je 0x4f6047
mov eax, dword [ebp - 0x254]
push eax
lea ecx, [ebp - 0x668]
push ecx
push 0x588794
lea edx, [ebp - 0x460]
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea eax, [ebp - 0x668]
push eax
push 0
call fcn.004f5960
add esp, 8
jmp 0x4f6091
mov ecx, dword [ebp - 0x254]
push ecx
lea edx, [ebp - 0x668]
push edx
mov eax, dword [ebp - 0x684]
add eax, 0x244
push eax
push 0x5887a0
lea ecx, [ebp - 0x460]
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x14
lea edx, [ebp - 0x668]
push edx
mov eax, dword [ebp - 0x684]
add eax, 0x244
push eax
call fcn.004f5960
add esp, 8
push 0
mov ecx, dword [ebp - 0x2c]
push ecx
push 2
push 0
push 0
push 0x40000000
lea edx, [ebp - 0x460]
push edx
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
jne 0x4f60c2
mov eax, 0x200
jmp 0x4f624d
mov eax, dword [ebp - 0x684]
mov ecx, dword [eax + 0x23c]
push ecx
mov edx, dword [ebp - 0x684]
mov eax, dword [edx]
push eax
call fcn.004f43d0
add esp, 8
mov ecx, dword [ebp - 0x684]
cmp dword [ecx + 0x240], 0
jne 0x4f6114
push 0x4000
call fcn.00519ac8
add esp, 4
mov dword [ebp - 0x680], eax
mov edx, dword [ebp - 0x684]
mov eax, dword [ebp - 0x680]
mov dword [edx + 0x240], eax
mov dword [ebp - 0x23c], 0
cmp dword [ebp - 0x23c], 0
jne 0x4f61fa
lea ecx, [ebp - 0x671]
push ecx
push 0x4000
mov edx, dword [ebp - 0x684]
mov eax, dword [edx + 0x240]
push eax
mov ecx, dword [ebp - 0x684]
mov edx, dword [ecx]
push edx
call fcn.004f4660
add esp, 0x10
mov dword [ebp - 0x670], eax
cmp dword [ebp - 0x670], 0xffffff96
jne 0x4f6173
mov dword [ebp - 0x23c], 0x1000
jmp 0x4f61fa
cmp dword [ebp - 0x670], 0
jge 0x4f6188
mov dword [ebp - 0x23c], 0x5000000
jmp 0x4f61fa
cmp dword [ebp - 0x670], 0
jle 0x4f61d3
push 0
lea eax, [ebp - 0x67c]
push eax
mov ecx, dword [ebp - 0x670]
push ecx
mov edx, dword [ebp - 0x684]
mov eax, dword [edx + 0x240]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.DLL_WriteFile]
mov dword [ebp - 0x678], eax
cmp dword [ebp - 0x678], 0
jne 0x4f61d3
mov dword [ebp - 0x23c], 0x400
jmp 0x4f61fa
movzx edx, byte [ebp - 0x671]
test edx, edx
je 0x4f61e0
jmp 0x4f61fa
cmp dword [ebp - 0x670], 0
jne 0x4f61f5
mov dword [ebp - 0x23c], 0x5000000
jmp 0x4f61fa
jmp 0x4f611e
cmp dword [ebp - 0x23c], 0
jne 0x4f6219
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x28]
push ecx
lea edx, [ebp - 0x20]
push edx
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.DLL_SetFileTime]
cmp dword [ebp + 0x14], 1
je 0x4f6229
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov edx, dword [ebp - 0x684]
mov eax, dword [edx]
push eax
call fcn.004f4a80
add esp, 4
cmp dword [ebp - 0x23c], 0
je 0x4f624b
mov eax, dword [ebp - 0x23c]
jmp 0x4f624d
xor eax, eax
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00538a54
mov esp, ebp
pop ebp
ret 0x10