Function at 0x40f250
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x423c
call fcn.0041e180
mov eax, dword [0x42e4a0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov ebx, ecx
or esi, 0xffffffff
push edi
mov dword [ebp - 0x423c], eax
cmp dword [ebx + 4], esi
je 0x40f284
mov edi, dword [ebx]
call fcn.0040ea20
mov edi, dword [ebp + 8]
mov dword [ebx + 4], esi
mov esi, dword [ebx]
cmp edi, dword [esi + 4]
jl 0x40f2a9
pop edi
pop esi
mov eax, 0x10000
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00410127
mov esp, ebp
pop ebp
ret 8
cmp edi, dword [esi + 0x10]
jge 0x40f2b3
call fcn.0040e480
mov ecx, dword [ebx]
cmp dword [ecx + 0x10], edi
jge 0x40f30d
lea ebx, [ebx]
mov esi, dword [ebx]
test esi, esi
je 0x40f306
cmp dword [esi + 0x18], 0
je 0x40f306
mov eax, dword [esi + 0x10]
inc eax
cmp eax, dword [esi + 4]
je 0x40f306
mov edx, dword [esi + 0x50]
add edx, dword [esi + 0x4c]
mov ecx, dword [esi + 0x48]
push 0
mov dword [esi + 0x10], eax
lea edx, [edx + ecx + 0x2e]
add dword [esi + 0x14], edx
push 0
lea eax, [esi + 0x78]
push eax
lea ecx, [esi + 0x28]
push ecx
mov eax, esi
call fcn.0040e020
add esp, 0x10
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x18], eax
mov edx, dword [ebx]
cmp dword [edx + 0x10], edi
jl 0x40f2c0
push edi
lea edx, [ebp - 0x4234]
mov ecx, ebx
call fcn.0040eb60
test byte [ebp - 0x412c], 0x10
je 0x40f34f
lea eax, [ebp - 0x4230]
push eax
add ebx, 0x138
push ebx
call fcn.0040f180
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00410127
mov esp, ebp
pop ebp
ret 8
mov edi, dword [ebp - 0x423c]
mov al, byte [edi]
mov esi, edi
mov ecx, edi
test al, al
je 0x40f410
cmp al, 0x2f
je 0x40f36b
cmp al, 0x5c
jne 0x40f36e
lea esi, [ecx + 1]
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x40f363
cmp esi, edi
je 0x40f410
lea edx, [ebp - 0x108]
mov eax, edi
sub edx, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x40f388
sub esi, edi
mov byte [ebp + esi - 0x109], cl
mov al, byte [ebp - 0x108]
cmp al, 0x2f
je 0x40f3b8
cmp al, 0x5c
je 0x40f3b8
cmp byte [ebp - 0x107], 0x3a
mov byte [ebp - 0x4235], cl
jne 0x40f3bf
mov byte [ebp - 0x4235], 1
lea ecx, [ebp - 0x108]
push 0x42b154
push ecx
call fcn.00411daf
lea edx, [ebp - 0x108]
push 0x42b158
push edx
mov esi, eax
call fcn.00411daf
add esp, 0x10
test eax, eax
setne al
test esi, esi
setne cl
or al, cl
or al, byte [ebp - 0x4235]
jne 0x40f410
lea edx, [ebp - 0x108]
push edx
lea eax, [ebx + 0x138]
push eax
call fcn.0040f180
add esp, 8
mov ecx, dword [ebp - 0x412c]
push 0
push ecx
push 2
push 0
push 0
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40f44a
pop edi
pop esi
mov eax, 0x200
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00410127
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebx]
call fcn.0040e770
mov eax, dword [ebx]
lea edx, [ebp - 0x4108]
push edx
mov ecx, 0x4000
mov byte [ebp - 0x4235], 0
call fcn.0040e880
add esp, 4
test eax, eax
js 0x40f4ac
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
je 0x40f4b3
push 0
lea ecx, [ebp - 0x423c]
push ecx
push eax
lea edx, [ebp - 0x4108]
push edx
push esi
call edi
test eax, eax
je 0x40f4ac
lea eax, [ebp - 0x4108]
push eax
mov eax, dword [ebx]
mov ecx, 0x4000
call fcn.0040e880
add esp, 4
test eax, eax
jns 0x40f478
mov byte [ebp - 0x4235], 1
push esi
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x40f4e4
cmp byte [ebp - 0x4235], 0
jne 0x40f4e4
lea ecx, [ebp - 0x4118]
push ecx
lea edx, [ebp - 0x4128]
push edx
lea eax, [ebp - 0x4120]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebx]
call fcn.0040ea20
movzx eax, byte [ebp - 0x4235]
mov ecx, dword [ebp - 4]
neg eax
pop edi
sbb eax, eax
pop esi
xor ecx, ebp
and eax, 0x400
pop ebx
call fcn.00410127
mov esp, ebp
pop ebp
ret 8