Function at 0x407640
Capabilities:
Create directory
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x413c5b
mov eax, dword fs:[0]
push eax
mov eax, 0x4354
call fcn.004120b0
mov eax, dword [0x41c0ac]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x4304], edx
mov esi, ecx
push 0x4018
lea eax, [ebp - 0x42bc]
xorps xmm0, xmm0
push 0
push eax
mov dword [ebp - 0x4300], 0
movq qword [ebp - 0x42fc], xmm0
mov dword [ebp - 0x42c0], 0
call fcn.0040d9a0
add esp, 0xc
lea eax, [ebp - 0x435c]
push 0x4c
push 0
push eax
mov dword [ebp - 0x4360], 0
call fcn.0040d9a0
add esp, 0xc
xor edi, edi
push 3
lea eax, [ebp - 0x29c]
mov dword [ebp - 0x42d0], 0
mov dword [ebp - 0x42f0], 0
push esi
lea ecx, [ebp - 0x2a0]
mov dword [ebp - 0x42c8], edi
mov dword [ebp - 0x42e8], edi
mov dword [ebp - 0x430c], 0xffffffff
mov dword [ebp - 0x42e0], edi
mov dword [ebp - 0x4308], edi
mov dword [ebp - 0x42d4], 0x401000
mov dword [ebp - 0x42d0], 0x401020
mov dword [ebp - 0x42f4], 0x401000
mov dword [ebp - 0x42f0], 0x401020
mov dword [ebp - 0x2a0], eax
call fcn.00408de0
push edi
push 0x80
push 3
push edi
push 1
push 0x80000000
mov dword [ebp - 4], edi
push dword [ebp - 0x2a0]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x42f8], eax
cmp eax, 0xffffffff
je 0x40777a
xor ebx, ebx
jmp 0x40777e
call esi
mov ebx, eax
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x2a0]
lea eax, [ebp - 0x29c]
cmp ecx, eax
je 0x40779e
push ecx
call fcn.0040a52e
add esp, 4
test ebx, ebx
jne 0x407b1b
lea eax, [ebp - 0x4300]
mov dword [ebp - 0x4300], 0x401f70
mov dword [ebp - 0x42fc], 0x401f90
mov dword [ebp - 0x42c0], 0x404a10
mov dword [ebp - 0x42bc], 0x404a70
mov dword [ebp - 0x42b8], 0x404a80
mov dword [ebp - 0x42b4], 0x404ad0
mov dword [ebp - 0x42b0], eax
mov dword [ebp - 0x42a8], ebx
mov dword [ebp - 0x42ac], ebx
call fcn.004010a0
lea ecx, [ebp - 0x4360]
call fcn.00402220
lea eax, [ebp - 0x42f4]
push eax
lea eax, [ebp - 0x42d4]
push eax
lea edx, [ebp - 0x42c0]
call fcn.004043a0
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x407845
lea edx, [ebp - 0x42d4]
lea ecx, [ebp - 0x4360]
call fcn.00402290
test ebx, ebx
jne 0x407b1b
xor esi, esi
mov dword [ebp - 0x42c4], esi
cmp dword [ebp - 0x4344], esi
jbe 0x407aff
mov eax, dword [ebp - 0x4350]
add eax, 0x19
mov dword [ebp - 0x42d8], esi
mov dword [ebp - 0x42cc], eax
mov edi, edi
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x218], ax
lea eax, [ebp - 0x216]
push eax
call fcn.0040d9a0
add esp, 0xc
lea eax, [ebp - 0x218]
push dword [ebp - 0x4304]
push 0x104
push eax
call fcn.0040b15e
mov edx, dword [ebp - 0x4320]
mov eax, dword [ebp - 0x42c4]
mov esi, dword [edx + esi*4 + 4]
sub esi, dword [edx + eax*4]
add esp, 0xc
mov dword [ebp - 0x42e4], 0
mov dword [ebp - 0x42dc], 0
cmp esi, dword [ebp - 0x42e8]
jbe 0x40790d
push edi
call fcn.0040a52e
add esp, 4
mov dword [ebp - 0x42e8], esi
add esi, esi
je 0x407aeb
push esi
call fcn.0040a566
mov edi, eax
add esp, 4
mov dword [ebp - 0x42c8], edi
test edi, edi
je 0x407aed
mov edx, dword [ebp - 0x4320]
mov esi, dword [ebp - 0x42c4]
mov ecx, dword [edx + esi*4]
mov edx, dword [edx + esi*4 + 4]
sub edx, ecx
test edi, edi
je 0x407944
mov eax, dword [ebp - 0x431c]
lea esi, [eax + ecx*2]
test edx, edx
je 0x40793e
mov ecx, edi
sub esi, edi
mov ax, word [esi + ecx]
mov word [ecx], ax
lea ecx, [ecx + 2]
dec edx
jne 0x407931
mov esi, dword [ebp - 0x42c4]
push edi
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov eax, dword [ebp - 0x42cc]
cmp byte [eax], 0
jne 0x4079ad
lea eax, [ebp - 0x42f4]
push eax
lea eax, [ebp - 0x42d4]
push eax
lea eax, [ebp - 0x42dc]
push eax
lea eax, [ebp - 0x42e4]
push eax
lea eax, [ebp - 0x4308]
push eax
lea eax, [ebp - 0x42e0]
push eax
lea eax, [ebp - 0x430c]
push eax
push esi
lea edx, [ebp - 0x42c0]
lea ecx, [ebp - 0x4360]
call fcn.00404730
mov ebx, eax
add esp, 0x20
test ebx, ebx
jne 0x407aff
xor edi, edi
cmp word [ebp - 0x218], di
je 0x407a0b
xor ecx, ecx
lea esi, [ebp - 0x218]
movzx eax, word [esi]
cmp eax, 0x2f
je 0x4079d2
mov edx, 0x2f2f
cmp ax, dx
jne 0x4079f9
cmp ecx, 0x208
jae 0x407af4
xor eax, eax
push eax
mov word [esi], ax
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov eax, 0x5c
mov word [esi], ax
inc edi
lea esi, [ebp - 0x218]
lea ecx, [edi + edi]
add esi, ecx
cmp word [esi], 0
jne 0x4079c0
mov edi, dword [ebp - 0x42cc]
push 0
cmp byte [edi], 0
lea eax, [ebp - 0x218]
je 0x407a27
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
jmp 0x407a96
mov edi, dword [ebp - 0x42e4]
add edi, dword [ebp - 0x42e0]
push 0x80
push 2
xor ebx, ebx
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x407a58
mov ebx, 1
jmp 0x407a90
push 0
lea eax, [ebp - 0x42ec]
push eax
push dword [ebp - 0x42dc]
mov dword [ebp - 0x42ec], ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x42dc]
cmp dword [ebp - 0x42ec], eax
mov eax, 1
push esi
cmovne ebx, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp - 0x42cc]
test ebx, ebx
jne 0x407af9
mov eax, dword [ebp - 0x42d8]
xor edx, edx
div dword [ebp - 0x4344]
push ebx
push eax
push 0x466
push dword [0x41e798]
call dword [sym.imp.USER32.dll_PostMessageW]
mov esi, dword [ebp - 0x42c4]
add dword [ebp - 0x42d8], 0x64
add edi, 0x20
inc esi
mov dword [ebp - 0x42cc], edi
mov edi, dword [ebp - 0x42c8]
mov dword [ebp - 0x42c4], esi
cmp esi, dword [ebp - 0x4344]
jae 0x407aff
jmp 0x407870
xor edi, edi
mov ebx, 1
jmp 0x407aff
call fcn.0040ad7a
mov edi, dword [ebp - 0x42c8]
push dword [ebp - 0x42e0]
lea eax, [ebp - 0x42d4]
push eax
call dword [ebp - 0x42d0]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 8
lea edx, [ebp - 0x42d4]
lea ecx, [ebp - 0x4360]
call fcn.00402290
push edi
call fcn.0040a52e
mov eax, dword [ebp - 0x42f8]
add esp, 4
cmp eax, 0xffffffff
je 0x407b4d
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x407b4d
call esi
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040a51f
mov esp, ebp
pop ebp
ret