Function at 0x40f170
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x41f030
mov eax, dword fs:[0]
push eax
mov eax, 0x2368
call fcn.0041d0a0
mov eax, dword [0x42afb8]
xor eax, esp
mov dword [esp + 0x2364], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x42afb8]
xor eax, esp
push eax
lea eax, [esp + 0x237c]
mov dword fs:[0], eax
mov eax, dword [esp + 0x238c]
push eax
mov dword [esp + 0x2388], 1
mov byte [esp + 0x1b], 1
call fcn.0040ee50
mov ebp, eax
xor ebx, ebx
add esp, 4
cmp ebp, ebx
jne 0x40f1e0
mov byte [esp + 0x17], bl
jmp 0x40f3fb
push ebp
call fcn.0040e8e0
add esp, 4
test eax, eax
jne 0x40f3ee
push 0x4c
lea ecx, [esp + 0x24]
push ebx
push ecx
mov dword [esp + 0x28], ebx
call sub.MSVCR80.dll_memset
push ebx
push ebx
push ebx
push ebx
push 0x104
lea edx, [esp + 0x190]
push edx
lea eax, [esp + 0x40]
push eax
push ebp
call fcn.0040e8a0
mov esi, dword [sym.imp.MSVCR80.dll_strchr]
lea ecx, [esp + 0x19c]
push 0x2f
push ecx
call esi
add esp, 0x34
cmp eax, ebx
je 0x40f256
jmp 0x40f240
lea edx, [esp + 0x170]
push 0x2f
push edx
mov byte [eax], 0x5c
call esi
add esp, 8
cmp eax, ebx
jne 0x40f240
mov eax, dword [esp + 0x2390]
mov edi, dword [sym.imp.MSVCR80.dll__mbsnbcpy]
push 0x104
push eax
lea ecx, [esp + 0x74]
push ecx
call edi
add esp, 0xc
lea edx, [esp + 0x170]
push edx
lea eax, [esp + 0x70]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea ecx, [esp + 0x6c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
mov esi, eax
push esi
lea edx, [esp + 0x70]
push edx
push str.szFileName:__s____s_n
call dword [sym.imp.MSVCR80.dll_printf]
mov eax, esi
add esp, 0xc
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x40f2b0
sub eax, edx
cmp byte [eax + esi - 1], 0x5c
jne 0x40f2d6
lea eax, [esp + 0x6c]
push 1
push eax
call fcn.0041ad80
add esp, 8
jmp 0x40f3db
push 0x104
lea ecx, [esp + 0x70]
push ecx
lea edx, [esp + 0x27c]
push edx
call edi
lea eax, [esp + 0x78]
add esp, 0xc
cmp esi, eax
je 0x40f336
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x40f2f8
sub eax, edx
mov ecx, eax
mov eax, esi
lea esi, [eax + 1]
lea ebx, [ebx]
mov dl, byte [eax]
add eax, 1
cmp dl, bl
jne 0x40f310
sub eax, esi
sub ecx, eax
mov byte [esp + ecx + 0x274], bl
lea ecx, [esp + 0x274]
push 1
push ecx
call fcn.0041ad80
add esp, 8
push ebx
push 0x80
push 2
push ebx
push 1
push 2
lea edx, [esp + 0x84]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x40f3ee
push ebp
call fcn.0040f020
add esp, 4
test eax, eax
je 0x40f36f
mov byte [esp + 0x17], bl
jmp 0x40f3d4
push ebx
push 0x2000
lea eax, [esp + 0x380]
push eax
push ebp
call fcn.0040eb90
mov esi, eax
add esp, 0x10
cmp esi, ebx
jle 0x40f3c7
lea esp, [esp]
push ebx
lea ecx, [esp + 0x1c]
push ecx
push esi
lea edx, [esp + 0x384]
push edx
push edi
mov dword [esp + 0x2c], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
push 0x2000
lea eax, [esp + 0x380]
push eax
push ebp
call fcn.0040eb90
mov esi, eax
add esp, 0x10
cmp esi, ebx
jg 0x40f390
push ebp
call fcn.0040edc0
add esp, 4
cmp esi, ebx
jl 0x40f3ee
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
call fcn.0040e930
add esp, 4
test eax, eax
je 0x40f1f1
jmp 0x40f3f2
mov byte [esp + 0x17], bl
push ebp
call fcn.0040efe0
add esp, 4
mov eax, dword [esp + 0x238c]
add eax, 0xfffffff0
mov byte [esp + 0x2384], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f425
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x2390]
add eax, 0xfffffff0
mov dword [esp + 0x2384], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f453
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, byte [esp + 0x17]
mov ecx, dword [esp + 0x237c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x2364]
xor ecx, esp
call fcn.0041ce52
add esp, 0x2374
ret