Function at 0xb6aaf0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x358
mov eax, dword [str.g.0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 0x10]
mov ebx, ecx
mov esi, edx
mov dword [ebp - 0x354], ebx
mov dword [ebp - 0x350], esi
cmp edi, 3
je 0xb6ab48
cmp edi, 2
je 0xb6ac72
cmp edi, 1
je 0xb6ac72
mov eax, 0x10000
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00ba2239
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 4]
mov ecx, dword [ebp + 8]
cmp ecx, eax
je 0xb6abfc
cmp eax, 0xffffffff
je 0xb6ab65
mov edi, dword [ebx]
call fcn.00b6a170
mov ecx, dword [ebp + 8]
mov esi, dword [ebx]
mov dword [ebx + 4], 0xffffffff
cmp ecx, dword [esi + 4]
jge 0xb6ab30
cmp ecx, dword [esi + 0x10]
jge 0xb6ab80
call fcn.00b69ab0
mov ecx, dword [ebp + 8]
mov eax, dword [ebx]
cmp dword [eax + 0x10], ecx
jge 0xb6abd7
mov esi, dword [ebx]
test esi, esi
je 0xb6abcd
cmp dword [esi + 0x18], 0
je 0xb6abcd
mov eax, dword [esi + 0x10]
inc eax
cmp eax, dword [esi + 4]
je 0xb6abcd
mov ecx, dword [esi + 0x50]
add ecx, dword [esi + 0x4c]
mov edx, dword [esi + 0x48]
push 0
lea ecx, [ecx + edx + 0x2e]
add dword [esi + 0x14], ecx
mov dword [esi + 0x10], eax
push 0
lea edx, [esi + 0x78]
push edx
lea eax, [esi + 0x28]
push eax
mov eax, esi
call fcn.00b696b0
add esp, 0x10
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x18], eax
mov ecx, dword [ebx]
mov edx, dword [ebp + 8]
cmp dword [ecx + 0x10], edx
jl 0xb6ab87
mov eax, dword [ebx + 0x138]
mov ebx, dword [ebx]
push eax
call fcn.00b69da0
mov edx, dword [ebp - 0x354]
mov ecx, dword [ebp + 8]
mov esi, dword [ebp - 0x350]
add esp, 4
mov dword [edx + 4], ecx
mov ebx, edx
mov ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x349]
push eax
mov eax, dword [ebx]
push esi
call fcn.00b69f10
mov esi, eax
add esp, 8
test esi, esi
jg 0xb6ac25
mov edi, dword [ebx]
call fcn.00b6a170
mov dword [ebx + 4], 0xffffffff
cmp byte [ebp - 0x349], 0
jne 0xb6ad6f
test esi, esi
jle 0xb6ac4e
mov eax, 0x600
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00ba2239
mov esp, ebp
pop ebp
ret 0xc
lea eax, [esi + 0x6a]
neg eax
sbb eax, eax
and eax, 0x4fff000
add eax, 0x1000
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00ba2239
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 4], 0xffffffff
je 0xb6ac82
mov edi, dword [ebx]
call fcn.00b6a170
mov edi, dword [ebp + 0x10]
mov eax, dword [ebx]
mov ecx, dword [ebp + 8]
mov dword [ebx + 4], 0xffffffff
cmp ecx, dword [eax + 4]
jge 0xb6ab30
cmp ecx, dword [eax + 0x10]
jge 0xb6acaf
mov esi, eax
call fcn.00b69ab0
mov esi, dword [ebp - 0x350]
mov edi, dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
mov edx, dword [ebx]
cmp dword [edx + 0x10], ecx
jge 0xb6ad0f
mov esi, dword [ebx]
test esi, esi
je 0xb6acff
cmp dword [esi + 0x18], 0
je 0xb6acff
mov eax, dword [esi + 0x10]
inc eax
cmp eax, dword [esi + 4]
je 0xb6acff
mov ecx, dword [esi + 0x50]
add ecx, dword [esi + 0x4c]
mov edx, dword [esi + 0x48]
push 0
lea ecx, [ecx + edx + 0x2e]
add dword [esi + 0x14], ecx
mov dword [esi + 0x10], eax
push 0
lea edx, [esi + 0x78]
push edx
lea eax, [esi + 0x28]
push eax
mov eax, esi
call fcn.00b696b0
mov ecx, dword [ebp + 8]
add esp, 0x10
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x18], eax
mov edx, dword [ebx]
cmp dword [edx + 0x10], ecx
jl 0xb6acb6
mov esi, dword [ebp - 0x350]
mov edi, dword [ebp + 0x10]
push ecx
lea edx, [ebp - 0x348]
mov ecx, ebx
call fcn.00b6a3c0
test byte [ebp - 0x240], 0x10
je 0xb6ad84
cmp edi, 1
je 0xb6ad6f
mov al, byte [esi]
cmp al, 0x2f
je 0xb6ad3f
cmp al, 0x5c
je 0xb6ad3f
test al, al
je 0xb6ad5f
cmp byte [esi + 1], 0x3a
jne 0xb6ad5f
push esi
push 0
call fcn.00b6a9f0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00ba2239
mov esp, ebp
pop ebp
ret 0xc
push esi
add ebx, 0x140
push ebx
call fcn.00b6a9f0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00ba2239
mov esp, ebp
pop ebp
ret 0xc
cmp edi, 1
mov edi, esi
je 0xb6ae1f
mov al, byte [esi]
mov ecx, esi
test al, al
je 0xb6adaa
cmp al, 0x2f
je 0xb6ad9f
cmp al, 0x5c
jne 0xb6ada2
lea edi, [ecx + 1]
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0xb6ad97
lea edx, [ebp - 0x110]
mov eax, esi
sub edx, esi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0xb6adb4
cmp edi, esi
jne 0xb6ae3c
mov byte [ebp - 0x110], cl
push edi
lea ecx, [ebp - 0x110]
push ecx
lea esi, [ebx + 0x140]
push esi
lea edx, [ebp - 0x218]
push str._s_s_s
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
lea eax, [ebp - 0x110]
push eax
push esi
call fcn.00b6a9f0
add esp, 8
mov ecx, dword [ebp - 0x240]
push 0
push ecx
push 2
push 0
push 0
push 0x40000000
lea edx, [ebp - 0x218]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0xb6ae9b
mov eax, 0x200
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00ba2239
mov esp, ebp
pop ebp
ret 0xc
mov eax, edi
sub eax, esi
mov byte [ebp + eax - 0x110], 0
mov al, byte [ebp - 0x110]
cmp al, 0x2f
je 0xb6ae6b
cmp al, 0x5c
je 0xb6ae6b
test al, al
je 0xb6adc8
cmp byte [ebp - 0x10f], 0x3a
jne 0xb6adc8
push edi
lea ecx, [ebp - 0x110]
push ecx
lea edx, [ebp - 0x218]
push str._s_s
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x110]
push eax
push 0
call fcn.00b6a9f0
add esp, 0x18
jmp 0xb6adfc
mov eax, dword [ebx + 0x138]
mov ebx, dword [ebx]
push eax
call fcn.00b69da0
mov ebx, dword [ebp - 0x354]
add esp, 4
cmp dword [ebx + 0x13c], 0
jne 0xb6aece
push 0x4000
call fcn.00ba2640
add esp, 4
mov dword [ebx + 0x13c], eax
mov dword [ebp - 0x350], 0
jmp 0xb6aee0
mov edx, dword [ebx + 0x13c]
mov eax, dword [ebx]
lea ecx, [ebp - 0x349]
push ecx
push edx
mov ecx, 0x4000
call fcn.00b69f10
mov esi, eax
add esp, 8
cmp esi, 0xffffff96
je 0xb6af3f
test esi, esi
js 0xb6af33
jle 0xb6af26
mov ecx, dword [ebx + 0x13c]
push 0
lea eax, [ebp - 0x354]
push eax
push esi
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0xb6af4b
cmp byte [ebp - 0x349], 0
jne 0xb6af57
test esi, esi
jne 0xb6aee0
mov dword [ebp - 0x350], 0x5000000
jmp 0xb6af73
mov dword [ebp - 0x350], 0x1000
jmp 0xb6af73
mov dword [ebp - 0x350], 0x400
jmp 0xb6af73
lea edx, [ebp - 0x22c]
push edx
lea eax, [ebp - 0x23c]
push eax
lea ecx, [ebp - 0x234]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x10], 1
je 0xb6af80
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebx]
call fcn.00b6a170
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x350]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00ba2239
mov esp, ebp
pop ebp
ret 0xc