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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x9bc
mov eax, dword [0x413004]
xor eax, esp
mov dword [esp + 0x9b8], eax
push ebx
push esi
xor esi, esi
lea ecx, [esp + 0x3c]
push edi
mov ebx, esi
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x14], esi
call fcn.0040fa55
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], esi
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push esi
mov dword [esp + 0x40], eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push 0x4051a0
mov dword [esp + 0x14], eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x405ffe
push 0x4051b0
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esp + 0x28], eax
test eax, eax
je 0x405ff5
push esi
push esi
push 1
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov ecx, dword [esp + 0x34]
push eax
call dword [0x414220]
call dword [esp + 0x38]
test eax, eax
jne 0x405ff5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x406004
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [0x4130e8]
cmp eax, 0xffffffff
jne 0x406018
call fcn.0040e5f0
mov eax, dword [0x4130e8]
mov edi, 0x4011d8
push edi
push eax
call fcn.0040e818
pop ecx
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push 0x401248
push dword [0x4130e8]
call fcn.0040e818
add esp, 0xc
push edi
push dword [0x4130e8]
call fcn.0040e818
push 0x20a
lea eax, [esp + 0x18c]
push esi
push eax
call sub.msvcrt.dll_memset
pop ecx
lea ecx, [esp + 0x3c]
call fcn.0040f4fe
push ecx
lea eax, [esp + 0x184]
push eax
lea eax, [esp + 0x1c]
push eax
push dword [esp + 0x48]
lea ecx, [esp + 0x3c]
call fcn.0040f7a6
mov edi, 0x800
test eax, eax
je 0x40629b
xor eax, eax
cmp byte [esp + 0x14], al
push ecx
push ecx
setne al
push eax
push ecx
lea ecx, [esp + 0x30]
call fcn.0040d77e
test eax, eax
je 0x406292
push esi
push esi
lea edx, [esp + 0x188]
lea ecx, [esp + 0x1c]
call fcn.00405ce6
test eax, eax
je 0x40629e
lea eax, [esp + 0x180]
push eax
push dword [esp + 0x18]
push 0x4012a0
push dword [0x4130e8]
call fcn.0040e818
mov edx, dword [esp + 0x24]
add esp, 0x10
test dl, 0x10
je 0x40610e
xor ebx, ebx
inc ebx
mov edi, esi
push 1
push edi
lea edx, [esp + 0x188]
lea ecx, [esp + 0x1c]
call fcn.00405ce6
jmp 0x40629e
test dl, 1
je 0x40615e
cmp edx, 1
je 0x406120
cmp edx, 0x801
jne 0x4060f1
xor eax, eax
cmp ax, word [esp + 0x180]
je 0x4060f1
test edi, edx
mov edi, dword [esp + 0x10]
jne 0x406146
lea edx, [esp + 0x180]
mov ecx, edi
call fcn.0040db05
test eax, eax
je 0x4060f4
push 1
lea edx, [esp + 0x184]
mov ecx, edi
call fcn.0040dcb7
mov edi, eax
mov dword [esp + 0x1c], edi
jmp 0x4060f6
test dl, 2
je 0x406183
cmp edx, 2
jne 0x4060f1
xor eax, eax
cmp ax, word [esp + 0x180]
jne 0x4060f1
mov ecx, dword [esp + 0x10]
call fcn.0040d523
jmp 0x406156
test dl, 8
je 0x40621e
cmp edx, 8
jne 0x4060f1
xor eax, eax
cmp ax, word [esp + 0x180]
jne 0x4060f1
lea eax, [esp + 0x5a0]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x4061ee
sub esp, 0xc
lea ecx, [esp + 0x5ac]
mov edx, 0x105
push 0x401338
call fcn.00410f31
test eax, eax
js 0x4061ee
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x5a0]
call fcn.0040d3a7
jmp 0x406156
mov ebx, dword [esp + 0x38]
test ebx, ebx
je 0x4064ac
mov edi, esi
cmp dword [esp + 0x2c], esi
jbe 0x406212
push dword [ebx + edi*8]
call dword [sym.imp.cmutil.dll_CmFree]
inc edi
cmp edi, dword [esp + 0x2c]
jb 0x406202
push ebx
call dword [sym.imp.cmutil.dll_CmFree]
jmp 0x4064ac
test dl, 4
jne 0x4060f1
mov eax, edx
xor ecx, ecx
and eax, 0x5000
cmp eax, 0x4000
lea eax, [esp + 0x20]
push eax
setne cl
mov eax, edx
and eax, 0x2000
push eax
mov eax, edx
push ecx
mov ecx, dword [esp + 0x1c]
and eax, edi
push eax
mov eax, edx
and edx, 0x400
and eax, 0x200
push eax
push edx
lea edx, [esp + 0x198]
call fcn.0040ba92
mov edi, eax
mov dword [esp + 0x1c], edi
test edi, edi
jns 0x4060f6
push edi
push edi
push 0x401340
push dword [0x4130e8]
call fcn.0040e818
add esp, 0x10
jmp 0x4060f6
xor eax, eax
inc eax
mov dword [esp + 0x18], eax
jmp 0x40629e
xor ebx, ebx
inc ebx
mov eax, dword [esp + 0x38]
test eax, eax
je 0x4062cd
mov edi, esi
cmp dword [esp + 0x2c], esi
jbe 0x4062c6
mov esi, eax
push dword [esi + edi*8]
call dword [sym.imp.cmutil.dll_CmFree]
inc edi
cmp edi, dword [esp + 0x2c]
jb 0x4062b0
mov eax, dword [esp + 0x38]
xor esi, esi
push eax
call dword [sym.imp.cmutil.dll_CmFree]
mov edi, dword [0x413474]
test edi, edi
je 0x4062f3
cmp dword [edi], 0
je 0x4062ec
push dword [edi]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [edi], esi
mov edi, dword [0x413474]
push edi
call dword [sym.imp.cmutil.dll_CmFree]
mov edi, dword [0x41346c]
test edi, edi
je 0x406319
cmp dword [edi], 0
je 0x406312
push dword [edi]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [edi], esi
mov edi, dword [0x41346c]
push edi
call dword [sym.imp.cmutil.dll_CmFree]
mov edi, dword [0x413478]
test edi, edi
je 0x40633f
cmp dword [edi], 0
je 0x406338
push dword [edi]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [edi], esi
mov edi, dword [0x413478]
push edi
call dword [sym.imp.cmutil.dll_CmFree]
mov edi, dword [0x413470]
test edi, edi
je 0x406365
cmp dword [edi], 0
je 0x40635e
push dword [edi]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [edi], esi
mov edi, dword [0x413470]
push edi
call dword [sym.imp.cmutil.dll_CmFree]
lea ecx, [esp + 0x20]
call fcn.0040d89b
test ebx, ebx
je 0x4063f7
push 0x4013ac
push dword [0x4130e8]
call fcn.0040e818
test dword [esp + 0x1c], 0x800
pop ecx
pop ecx
jne 0x40644d
push 0xfd2
call dword [sym.imp.cmutil.dll_CmMalloc]
mov edi, eax
test edi, edi
je 0x40644d
push 0x104
lea eax, [esp + 0x394]
push eax
push 0xd2
push dword [esp + 0x1c]
call dword [sym.imp.USER32.dll_LoadStringW]
push 0x7e8
push edi
push 0xc8
push dword [esp + 0x1c]
call dword [sym.imp.USER32.dll_LoadStringW]
push 0x40
lea eax, [esp + 0x394]
push eax
push edi
push esi
call dword [sym.imp.USER32.dll_MessageBoxW]
push edi
call dword [sym.imp.cmutil.dll_CmFree]
jmp 0x40644d
mov eax, dword [esp + 0x18]
test eax, eax
je 0x406451
mov edi, dword [esp + 0x10]
lea eax, [esp + 0x390]
push 0x104
push eax
push 0xd2
push edi
call dword [sym.imp.USER32.dll_LoadStringW]
push 0x104
lea eax, [esp + 0x7b4]
push eax
push 0xd1
push edi
call dword [sym.imp.USER32.dll_LoadStringW]
push esi
lea eax, [esp + 0x394]
push eax
lea eax, [esp + 0x7b8]
push eax
push esi
call dword [sym.imp.USER32.dll_MessageBoxW]
mov eax, dword [esp + 0x18]
cmp dword [esp + 0x1c], 0
jl 0x406463
test ebx, ebx
jne 0x406463
test eax, eax
jne 0x406463
xor esi, esi
inc esi
mov edi, 0x4011d8
push edi
push dword [0x4130e8]
call fcn.0040e818
pop ecx
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push 0x4013e0
push dword [0x4130e8]
call fcn.0040e818
add esp, 0xc
push edi
push dword [0x4130e8]
call fcn.0040e818
cmp dword [0x4130e8], 0xffffffff
pop ecx
pop ecx
je 0x4064ac
call fcn.0040e67a
lea ecx, [esp + 0x20]
call fcn.0040d89b
mov ecx, dword [esp + 0x9c4]
mov eax, esi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00411980
mov esp, ebp
pop ebp
ret 0x10