Function at 0x612e40
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x354
mov eax, dword [0x6bd8f4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x34c], esi
test eax, eax
je 0x612e95
cmp dword [eax], 1
je 0x612e74
mov eax, 0x80000
jmp 0x613147
mov ebx, dword [eax + 4]
cmp dword [ebx + 4], 0xffffffff
je 0x612e84
mov edi, dword [ebx]
call fcn.0060de80
mov eax, dword [ebx]
mov edi, dword [ebp + 0xc]
mov dword [ebx + 4], 0xffffffff
cmp edi, dword [eax + 4]
jl 0x612e9f
mov eax, 0x10000
jmp 0x613147
cmp edi, dword [eax + 0x10]
jge 0x612eb1
mov esi, eax
call fcn.006119d0
mov esi, dword [ebp - 0x34c]
mov eax, dword [ebx]
cmp dword [eax + 0x10], edi
jge 0x612f0b
mov esi, dword [ebx]
test esi, esi
je 0x612efe
cmp dword [esi + 0x18], 0
je 0x612efe
mov eax, dword [esi + 0x10]
inc eax
cmp eax, dword [esi + 4]
je 0x612efe
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.00610d00
add esp, 0x10
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x18], eax
mov ecx, dword [ebx]
cmp dword [ecx + 0x10], edi
jl 0x612eb8
mov esi, dword [ebp - 0x34c]
push edi
lea edx, [ebp - 0x348]
mov ecx, ebx
call fcn.00611cb0
test byte [ebp - 0x240], 0x10
mov al, byte [esi]
je 0x612f5f
cmp al, 0x2f
je 0x612f36
cmp al, 0x5c
je 0x612f36
test al, al
je 0x612f48
cmp byte [esi + 1], 0x3a
jne 0x612f48
push esi
push 0
call fcn.0060dc90
add esp, 8
xor eax, eax
jmp 0x613147
push esi
add ebx, 0x140
push ebx
call fcn.0060dc90
add esp, 8
xor eax, eax
jmp 0x613147
mov edi, esi
mov ecx, esi
test al, al
je 0x612f7a
cmp al, 0x2f
je 0x612f6f
cmp al, 0x5c
jne 0x612f72
lea edi, [ecx + 1]
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x612f67
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 0x612f84
cmp edi, esi
jne 0x612ffe
mov byte [ebp - 0x110], cl
push edi
lea eax, [ebp - 0x110]
push eax
lea esi, [ebx + 0x140]
push esi
lea ecx, [ebp - 0x218]
push str._s_s_s
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
lea edx, [ebp - 0x110]
push edx
push esi
call fcn.0060dc90
add esp, 8
mov eax, dword [ebp - 0x240]
push 0
push eax
push 2
push 0
push 0
push 0x40000000
lea ecx, [ebp - 0x218]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x61305d
mov eax, 0x200
jmp 0x613147
mov edx, edi
sub edx, esi
mov byte [ebp + edx - 0x110], 0
mov al, byte [ebp - 0x110]
cmp al, 0x2f
je 0x61302d
cmp al, 0x5c
je 0x61302d
test al, al
je 0x612f98
cmp byte [ebp - 0x10f], 0x3a
jne 0x612f98
push edi
lea eax, [ebp - 0x110]
push eax
lea ecx, [ebp - 0x218]
push str._s_s
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
lea edx, [ebp - 0x110]
push edx
push 0
call fcn.0060dc90
add esp, 0x18
jmp 0x612fcc
mov edx, dword [ebx + 0x138]
mov eax, dword [ebx]
push edx
call fcn.00611800
add esp, 4
cmp dword [ebx + 0x13c], 0
jne 0x61308a
push 0x4000
call fcn.00445145
add esp, 4
mov dword [ebx + 0x13c], eax
mov dword [ebp - 0x34c], 0
jmp 0x6130a0
mov ecx, dword [ebx + 0x13c]
lea eax, [ebp - 0x34d]
push eax
mov eax, dword [ebx]
push ecx
mov ecx, 0x4000
call fcn.006115a0
mov esi, eax
add esp, 8
cmp esi, 0xffffff96
je 0x6130ff
test esi, esi
js 0x6130f3
jle 0x6130e6
mov eax, dword [ebx + 0x13c]
push 0
lea edx, [ebp - 0x354]
push edx
push esi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x61310b
cmp byte [ebp - 0x34d], 0
jne 0x613117
test esi, esi
jne 0x6130a0
mov dword [ebp - 0x34c], 0x5000000
jmp 0x613133
mov dword [ebp - 0x34c], 0x1000
jmp 0x613133
mov dword [ebp - 0x34c], 0x400
jmp 0x613133
lea ecx, [ebp - 0x22c]
push ecx
lea edx, [ebp - 0x23c]
push edx
lea eax, [ebp - 0x234]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebx]
call fcn.0060de80
mov eax, dword [ebp - 0x34c]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov dword [0x6c5e58], eax
pop ebx
call fcn.005d7d2e
mov esp, ebp
pop ebp
ret