Function at 0x404e50
Capabilities:
Get common file path
Write file on windows

Disassembly:
sub esp, 0x28c
push ebx
mov ebx, ecx
push ebp
xor ebp, ebp
mov eax, dword [ebx + 0x320]
push esi
cmp eax, ebp
push edi
je 0x404f43
cmp eax, 5
je 0x404f43
cmp eax, 4
jne 0x404e91
pop edi
pop esi
mov dword [ebx + 0x320], 8
pop ebp
pop ebx
add esp, 0x28c
ret 8
mov edi, 8
cmp eax, edi
jne 0x404ec7
mov eax, dword [ebx + 0x31c]
mov dword [ebx + 0x320], 0xffffffff
cmp eax, 0x13
jne 0x404f4d
mov ecx, ebx
call fcn.00405560
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28c
ret 8
mov edx, 1
cmp eax, edx
jne 0x404f5a
mov eax, dword [ebx + 0x31c]
cmp eax, ebp
jl 0x404f0d
pop edi
mov dword [ebx + 0x32c], ebp
mov dword [ebx + 0x3b8], ebp
mov dword [ebx + 0x3b4], ebp
pop esi
mov dword [ebx + 0x320], 3
mov dword [ebx + 0x330], eax
pop ebp
pop ebx
add esp, 0x28c
ret 8
mov edx, dword [esp + 0x2a0]
mov esi, dword [0x4134b8]
cmp edx, esi
jl 0x404f43
mov eax, dword [esp + 0x2a4]
mov ecx, dword [0x4134bc]
cmp eax, ecx
jl 0x404f43
add esi, 0x17a
cmp edx, esi
jg 0x404f43
add ecx, 0xfd
cmp eax, ecx
jle 0x404f4d
mov dword [ebx + 0x320], 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28c
ret 8
mov esi, 2
cmp eax, esi
jne 0x404ffc
mov ecx, dword [ebx + 0x31c]
cmp ecx, ebp
jl 0x404f0d
mov eax, ecx
mov dword [ebx + 0x330], ecx
shl eax, 4
add eax, ebx
mov dword [ebx + 0x30], edx
mov dword [ebx + 0x688], esi
mov edx, dword [eax + 0x334]
mov dword [ebx + 0x3b4], edx
mov edx, dword [eax + 0x338]
mov dword [ebx + 0x3b8], edx
mov dword [ebx + 0x3c8], ebp
mov dword [ebx + 0x694], edi
mov edx, dword [eax + 0x33c]
add ecx, 0x34
shl ecx, 4
mov ecx, dword [ecx + ebx]
push ecx
mov ecx, dword [eax + 0x338]
push edx
mov edx, dword [eax + 0x334]
push ecx
mov ecx, dword [ebx + 0x71c]
push edx
call fcn.004065b0
mov ecx, dword [ebx + 0x718]
call fcn.00405cb0
or eax, 0xffffffff
pop edi
pop esi
mov dword [ebx + 0x320], eax
mov dword [ebx + 0x31c], eax
pop ebp
pop ebx
add esp, 0x28c
ret 8
cmp eax, 3
jne 0x4050fc
mov eax, dword [ebx + 0x31c]
mov dword [ebx + 0x32c], edx
cmp eax, edi
jne 0x405087
mov eax, dword [ebx + 0x330]
mov ecx, dword [ebx + 0x3b4]
shl eax, 4
mov dword [ebx + 0x30], edx
mov dword [ebx + 0x688], esi
mov dword [eax + ebx + 0x334], ecx
mov edx, dword [ebx + 0x330]
mov eax, dword [ebx + 0x3b8]
shl edx, 4
mov dword [edx + ebx + 0x338], eax
mov ecx, dword [ebx + 0x330]
shl ecx, 4
mov dword [ecx + ebx + 0x33c], ebp
mov edx, dword [ebx + 0x330]
add edx, 0x34
shl edx, 4
mov dword [edx + ebx], ebp
mov ecx, dword [ebx + 0x330]
mov eax, ecx
mov dword [ebx + 0x3c8], ebp
shl eax, 4
mov dword [ebx + 0x694], edi
add eax, ebx
jmp 0x404fab
cmp eax, edx
jne 0x4050b0
mov eax, dword [ebx + 0x3b8]
cmp eax, 0x3e7
jge 0x404f4d
inc eax
pop edi
pop esi
mov dword [ebx + 0x3b8], eax
pop ebp
pop ebx
add esp, 0x28c
ret 8
cmp eax, ebp
jne 0x4050d6
mov eax, dword [ebx + 0x3b8]
cmp eax, ebp
jle 0x404f4d
dec eax
pop edi
pop esi
mov dword [ebx + 0x3b8], eax
pop ebp
pop ebx
add esp, 0x28c
ret 8
cmp eax, edx
jle 0x404f0d
cmp eax, edi
jge 0x404f0d
add eax, 0xfffffffe
pop edi
pop esi
mov dword [ebx + 0x3b4], eax
pop ebp
pop ebx
add esp, 0x28c
ret 8
cmp eax, 6
jne 0x4052b7
mov ecx, dword [ebx + 0x40]
mov eax, dword [ebx + 0x31c]
lea esi, [ecx + 0xe]
cmp eax, esi
jge 0x40512d
cmp eax, 0xd
jle 0x40512d
add eax, 0xfffffff2
pop edi
pop esi
mov dword [ebx + 0x44], eax
pop ebp
pop ebx
add esp, 0x28c
ret 8
cmp eax, 9
jne 0x4051bb
mov ecx, dword [ebx + 0x318]
or eax, 0xffffffff
mov dword [ebx + 0x320], eax
mov dword [ebx + 0x330], eax
mov eax, 0xa
mov dword [ebx + 0x3b8], 0xa
sub eax, ecx
mov ecx, dword [esp + 0x10]
push ecx
mov ecx, dword [esp + 0x14]
push ecx
mov ecx, dword [ebx + 0x71c]
push 0xa
push eax
push edx
mov dword [ebx + 0x3b4], eax
mov dword [ebx + 0x688], edx
mov dword [ebx + 0x30], edx
mov dword [ebx + 0x3c8], ebp
mov dword [ebx + 0x694], edi
call fcn.00406230
push 0x7f00
push ebp
call dword [sym.imp.USER32.dll_LoadCursorA]
push eax
call dword [sym.imp.USER32.dll_SetCursor]
mov ecx, dword [ebx + 0x718]
call fcn.00405cb0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28c
ret 8
cmp eax, 0xa
je 0x404f43
cmp eax, 0xb
jne 0x4051fb
mov dword [ebx + 0x320], 0xffffffff
xor eax, eax
mov ecx, dword [ebx + 0x44]
mov edx, ecx
shl edx, 5
sub edx, ecx
add edx, eax
inc eax
cmp eax, 0x1f
mov dword [ebx + edx*4 + 0xac], ebp
jl 0x4051d5
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28c
ret 8
cmp eax, 0xc
jne 0x405299
mov ebp, dword [ebx + 0x44]
dec ecx
cmp ebp, ecx
mov dword [ebx + 0x320], 0xffffffff
jge 0x405274
mov eax, ebp
lea edx, [ebp + ebp*4]
shl eax, 5
sub eax, ebp
lea edx, [ebx + edx*4 + 0x48]
lea ecx, [ebx + eax*4 + 0xac]
mov dword [esp + 0x10], ecx
lea edi, [edx + 0x14]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x10]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x1f
mov esi, dword [eax + 0x7c]
mov dword [eax], esi
add eax, 4
dec ecx
jne 0x405259
mov ecx, dword [ebx + 0x40]
inc ebp
add edx, 0x14
dec ecx
cmp ebp, ecx
mov dword [esp + 0x10], eax
jl 0x405230
mov esi, dword [ebx + 0x40]
mov eax, dword [ebx + 0x44]
dec esi
mov ecx, esi
mov dword [ebx + 0x40], esi
cmp eax, ecx
jl 0x404f4d
dec eax
pop edi
pop esi
mov dword [ebx + 0x44], eax
pop ebp
pop ebx
add esp, 0x28c
ret 8
cmp eax, 0xd
jne 0x404f4d
cmp ecx, 5
jge 0x404f4d
mov ecx, ebx
call fcn.00405480
jmp 0x404f43
mov eax, dword [ebx + 0x318]
cmp eax, esi
jne 0x4052d4
pop edi
pop esi
mov dword [ebx + 0x320], edx
pop ebp
pop ebx
add esp, 0x28c
ret 8
cmp eax, edx
jne 0x4052eb
mov dword [ebx + 0x320], esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28c
ret 8
cmp eax, 0xb
jne 0x405303
pop edi
mov dword [ebx + 0x320], ebp
pop esi
pop ebp
pop ebx
add esp, 0x28c
ret 8
cmp eax, ebp
jne 0x4053f1
lea edx, [esp + 0x9c]
push 0x200
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edi, 0x4134c0
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x9c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x1000
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x18]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0xa4]
push ecx
call dword [sym.imp.KERNEL32.dll_OpenFile]
mov esi, eax
cmp esi, 0xffffffff
je 0x4053dd
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
lea edx, [esp + 0x10]
push ebp
push edx
lea eax, [ebx + 0x334]
push 0x80
push eax
push esi
call edi
lea ecx, [esp + 0x10]
push 0
lea ebp, [ebx + 0x40]
push ecx
push 4
push ebp
push esi
call edi
mov eax, dword [ebp]
test eax, eax
jle 0x4053d4
lea eax, [eax + eax*4]
lea edx, [esp + 0x10]
push 0
push edx
shl eax, 2
lea ecx, [ebx + 0x48]
push eax
push ecx
push esi
call edi
mov ebp, dword [ebp]
lea edx, [esp + 0x10]
mov eax, ebp
push 0
shl eax, 5
sub eax, ebp
push edx
shl eax, 2
add ebx, 0xac
push eax
push ebx
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebp, ebp
push ebp
call dword [sym.imp.USER32.dll_PostQuitMessage]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28c
ret 8
cmp eax, 3
jne 0x405417
mov ecx, dword [ebx + 0x718]
mov dword [ecx + 0x14], edx
mov ecx, dword [ebx + 0x718]
call fcn.00405c80
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28c
ret 8
cmp eax, 4
jne 0x40543d
mov edx, dword [ebx + 0x718]
mov dword [edx + 0x14], ebp
mov ecx, dword [ebx + 0x718]
call fcn.00405cb0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28c
ret 8
jle 0x404f4d
cmp dword [ebx + 0x40], ebp
jne 0x40545c
mov ecx, ebx
call fcn.00405480
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28c
ret 8
pop edi
pop esi
mov dword [ebx + 0x320], 6
pop ebp
pop ebx
add esp, 0x28c
ret 8