Function at 0x500240
Capabilities:
Accept command line arguments
Get common file path

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x4b
push 0
push 0
dec ecx
jne 0x500248
push ecx
push ebx
push esi
push edi
mov dword [ebp - 8], edx
mov dword [ebp - 0x14], eax
xor eax, eax
push ebp
push 0x50061a
push dword fs:[eax]
mov dword fs:[eax], esp
push ebp
lea eax, [ebp - 0x224]
call fcn.004da59c
mov edx, dword [ebp - 0x224]
mov eax, 0x500634
call fcn.004fff00
pop ecx
push ebp
lea edx, [ebp - 0x228]
mov eax, dword [ebp - 0x14]
call fcn.005010c0
mov edx, dword [ebp - 0x228]
mov eax, 0x50065c
call fcn.004fff00
pop ecx
xor eax, eax
push ebp
push 0x5002e9
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x10]
call fcn.004da5dc
call fcn.00500000
test al, al
je 0x5002d0
lea eax, [ebp - 0x10]
mov edx, 0x500688
call fcn.00407ba4
push ebp
mov edx, dword [ebp - 0x10]
mov eax, 0x5006a8
call fcn.004fff00
pop ecx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x5002f3
xor eax, eax
push ebp
push 0x500328
push dword fs:[eax]
mov dword fs:[eax], esp
push ebp
lea eax, [ebp - 0x22c]
call fcn.004db150
mov edx, dword [ebp - 0x22c]
mov eax, 0x5006c8
call fcn.004fff00
pop ecx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x500332
xor eax, eax
push ebp
push 0x50036a
push dword fs:[eax]
mov dword fs:[eax], esp
push ebp
lea edx, [ebp - 0x230]
mov eax, dword [ebp - 0x14]
call fcn.00500be8
mov edx, dword [ebp - 0x230]
mov eax, 0x5006f8
call fcn.004fff00
pop ecx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x500374
xor eax, eax
push ebp
push 0x500408
push dword fs:[eax]
mov dword fs:[eax], esp
lea edx, [ebp - 0x10]
mov eax, dword [ebp - 0x14]
call fcn.00500c30
cmp dword [ebp - 0x10], 0
je 0x5003fe
mov eax, dword [ebp - 0x14]
call fcn.00500cec
mov ebx, eax
cmp ebx, 1
jne 0x5003b3
push ebp
mov edx, dword [ebp - 0x10]
mov eax, 0x500724
call fcn.004fff00
pop ecx
jmp 0x5003fe
push ebp
lea eax, [ebp - 0x234]
push eax
mov dword [ebp - 0x244], ebx
mov byte [ebp - 0x240], 0
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x23c], eax
mov byte [ebp - 0x238], 0x11
lea edx, [ebp - 0x244]
mov ecx, 1
mov eax, 0x500744
call fcn.00415e3c
mov edx, dword [ebp - 0x234]
mov eax, 0x500760
call fcn.004fff00
pop ecx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x500412
xor eax, eax
push ebp
push 0x500454
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x5625a8]
cmp byte [eax], 0
je 0x50044a
push ebp
lea edx, [ebp - 0x248]
mov eax, dword [ebp - 0x14]
call fcn.00500e18
mov edx, dword [ebp - 0x248]
mov eax, 0x500784
call fcn.004fff00
pop ecx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x50045e
xor eax, eax
push ebp
push 0x50058b
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x5007a4
push 0x5007cc
call sub.kernel32.dll_GetModuleHandleW_2
push eax
call fcn.0040cf94
mov dword [ebp - 0xc], eax
push 0x104
lea eax, [ebp - 0x21e]
push eax
call sub.kernel32.dll_GetWindowsDirectoryW
lea edx, [ebp - 0x10]
xor eax, eax
call fcn.0041dc60
mov ebx, dword [ebp - 0x10]
test ebx, ebx
je 0x5004be
mov eax, ebx
sub eax, 0xa
cmp word [eax], 2
je 0x5004be
lea eax, [ebp - 0x10]
mov edx, dword [ebp - 0x10]
call fcn.00406ad0
mov ebx, eax
movzx edx, word [ebx]
mov eax, dword [0x4fdee0]
call fcn.005013e0
mov ebx, eax
movzx edx, word [ebp - 0x21e]
mov eax, dword [0x4fdee0]
call fcn.005013e0
cmp bx, ax
je 0x50055b
mov ebx, dword [ebp - 0x10]
test ebx, ebx
je 0x500502
mov eax, ebx
sub eax, 0xa
cmp word [eax], 2
je 0x500502
lea eax, [ebp - 0x10]
mov edx, dword [ebp - 0x10]
call fcn.00406ad0
mov ebx, eax
push ebp
push ebp
lea edx, [ebp - 0x250]
movzx eax, word [ebp - 0x21e]
call fcn.005000c4
pop ecx
push dword [ebp - 0x250]
push 0x5007f4
push ebp
lea edx, [ebp - 0x254]
movzx eax, word [ebx]
call fcn.005000c4
pop ecx
push dword [ebp - 0x254]
lea eax, [ebp - 0x24c]
mov edx, 3
call fcn.00407d48
mov edx, dword [ebp - 0x24c]
mov eax, 0x500804
call fcn.004fff00
pop ecx
jmp 0x500581
push ebp
push ebp
lea edx, [ebp - 0x258]
movzx eax, word [ebp - 0x21e]
call fcn.005000c4
pop ecx
mov edx, dword [ebp - 0x258]
mov eax, 0x500804
call fcn.004fff00
pop ecx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x500595
xor eax, eax
push ebp
push 0x5005da
push dword fs:[eax]
mov dword fs:[eax], esp
call fcn.004045c0
test eax, eax
jle 0x5005d0
push ebp
call sub.kernel32.dll_GetCommandLineW_1
mov edx, eax
lea eax, [ebp - 0x25c]
call fcn.00407954
mov edx, dword [ebp - 0x25c]
mov eax, 0x500830
call fcn.004fff00
pop ecx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x5005e4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x500621
lea eax, [ebp - 0x25c]
mov edx, 6
call fcn.004077a0
lea eax, [ebp - 0x234]
mov edx, 5
call fcn.004077a0
lea eax, [ebp - 0x10]
call fcn.00407798
ret