Function at 0x401510
Capabilities:
Accept command line arguments
Extract resource via kernel32 functions
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9d0
mov eax, dword [0x429a8c]
xor eax, ebp
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [ebp - 0x974], eax
lea eax, [ebp - 0x110]
mov dword [ebp - 0x978], eax
mov ecx, dword [ebp - 0x978]
mov dword [ebp - 0x97c], ecx
mov edx, dword [ebp - 0x974]
mov al, byte [edx]
mov byte [ebp - 0x97d], al
mov ecx, dword [ebp - 0x978]
mov dl, byte [ebp - 0x97d]
mov byte [ecx], dl
mov eax, dword [ebp - 0x974]
add eax, 1
mov dword [ebp - 0x974], eax
mov ecx, dword [ebp - 0x978]
add ecx, 1
mov dword [ebp - 0x978], ecx
cmp byte [ebp - 0x97d], 0
jne 0x401547
lea edx, [ebp - 0x110]
push edx
push str._sGameConfig.ini
lea eax, [ebp - 0x310]
push eax
call fcn.00401d00
add esp, 0xc
push 0x1ec
push 0
push 0x42d6f8
call fcn.00411870
add esp, 0xc
push str.CLaunch
call fcn.00403dc0
add esp, 4
mov dword [ebp - 0x970], eax
mov dword [ebp - 0x96c], edx
mov ecx, dword [ebp - 0x970]
mov dword [ebp - 0x118], ecx
mov edx, dword [ebp - 0x96c]
mov dword [ebp - 0x114], edx
cmp dword [ebp - 0x118], 0
jne 0x4015fe
push 0x425608
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push 0x42d6f8
lea eax, [ebp - 0x310]
push eax
call fcn.00401180
add esp, 8
movzx ecx, al
test ecx, ecx
je 0x401a59
push 0x42d6f8
push str.__s__husky
lea edx, [ebp - 0x638]
push edx
call fcn.00401d30
add esp, 0xc
push 0
push 0
lea eax, [ebp - 0x520]
push eax
lea ecx, [ebp - 0x314]
push ecx
push 0x42d6f8
call fcn.0040e714
add esp, 0x14
lea edx, [ebp - 0x520]
push edx
lea eax, [ebp - 0x314]
push eax
push 0x425620
push 0x104
lea ecx, [ebp - 0x420]
push ecx
call fcn.0040e7dd
add esp, 0x14
lea edx, [ebp - 0x110]
push edx
push str._s_CT.dll
push 0x104
lea eax, [ebp - 0x520]
push eax
call fcn.0040e7dd
add esp, 0x10
push 0x330
push 0
lea ecx, [ebp - 0x968]
push ecx
call fcn.00411870
add esp, 0xc
lea edx, [ebp - 0x948]
mov dword [ebp - 0x530], edx
lea eax, [ebp - 0x928]
mov dword [ebp - 0x530], eax
lea ecx, [ebp - 0x520]
mov dword [ebp - 0x984], ecx
mov edx, dword [ebp - 0x530]
mov dword [ebp - 0x988], edx
mov eax, dword [ebp - 0x988]
mov dword [ebp - 0x98c], eax
mov ecx, dword [ebp - 0x984]
mov dl, byte [ecx]
mov byte [ebp - 0x98d], dl
mov eax, dword [ebp - 0x988]
mov cl, byte [ebp - 0x98d]
mov byte [eax], cl
mov edx, dword [ebp - 0x984]
add edx, 1
mov dword [ebp - 0x984], edx
mov eax, dword [ebp - 0x988]
add eax, 1
mov dword [ebp - 0x988], eax
cmp byte [ebp - 0x98d], 0
jne 0x4016ee
lea ecx, [ebp - 0x828]
mov dword [ebp - 0x530], ecx
mov dword [ebp - 0x994], 0x42d7f8
mov edx, dword [ebp - 0x530]
mov dword [ebp - 0x998], edx
mov eax, dword [ebp - 0x998]
mov dword [ebp - 0x99c], eax
mov ecx, dword [ebp - 0x994]
mov dl, byte [ecx]
mov byte [ebp - 0x99d], dl
mov eax, dword [ebp - 0x998]
mov cl, byte [ebp - 0x99d]
mov byte [eax], cl
mov edx, dword [ebp - 0x994]
add edx, 1
mov dword [ebp - 0x994], edx
mov eax, dword [ebp - 0x998]
add eax, 1
mov dword [ebp - 0x998], eax
cmp byte [ebp - 0x99d], 0
jne 0x40175f
lea ecx, [ebp - 0x800]
mov dword [ebp - 0x530], ecx
mov dword [ebp - 0x9a4], 0x42d834
mov edx, dword [ebp - 0x530]
mov dword [ebp - 0x9a8], edx
mov eax, dword [ebp - 0x9a8]
mov dword [ebp - 0x9ac], eax
mov ecx, dword [ebp - 0x9a4]
mov dl, byte [ecx]
mov byte [ebp - 0x9ad], dl
mov eax, dword [ebp - 0x9a8]
mov cl, byte [ebp - 0x9ad]
mov byte [eax], cl
mov edx, dword [ebp - 0x9a4]
add edx, 1
mov dword [ebp - 0x9a4], edx
mov eax, dword [ebp - 0x9a8]
add eax, 1
mov dword [ebp - 0x9a8], eax
cmp byte [ebp - 0x9ad], 0
jne 0x4017d0
lea ecx, [ebp - 0x7d8]
mov dword [ebp - 0x530], ecx
mov dword [ebp - 0x9b4], 0x42d870
mov edx, dword [ebp - 0x530]
mov dword [ebp - 0x9b8], edx
mov eax, dword [ebp - 0x9b8]
mov dword [ebp - 0x9bc], eax
mov ecx, dword [ebp - 0x9b4]
mov dl, byte [ecx]
mov byte [ebp - 0x9bd], dl
mov eax, dword [ebp - 0x9b8]
mov cl, byte [ebp - 0x9bd]
mov byte [eax], cl
mov edx, dword [ebp - 0x9b4]
add edx, 1
mov dword [ebp - 0x9b4], edx
mov eax, dword [ebp - 0x9b8]
add eax, 1
mov dword [ebp - 0x9b8], eax
cmp byte [ebp - 0x9bd], 0
jne 0x401841
mov dword [ebp - 0x788], 1
lea ecx, [ebp - 0x784]
mov dword [ebp - 0x530], ecx
mov dword [ebp - 0x9c4], 0x42d8ac
mov edx, dword [ebp - 0x530]
mov dword [ebp - 0x9c8], edx
mov eax, dword [ebp - 0x9c8]
mov dword [ebp - 0x9cc], eax
mov ecx, dword [ebp - 0x9c4]
mov dl, byte [ecx]
mov byte [ebp - 0x9cd], dl
mov eax, dword [ebp - 0x9c8]
mov cl, byte [ebp - 0x9cd]
mov byte [eax], cl
mov edx, dword [ebp - 0x9c4]
add edx, 1
mov dword [ebp - 0x9c4], edx
mov eax, dword [ebp - 0x9c8]
add eax, 1
mov dword [ebp - 0x9c8], eax
cmp byte [ebp - 0x9cd], 0
jne 0x4018bc
mov ecx, dword [0x42d8d4]
mov dword [ebp - 0x75c], ecx
mov edx, dword [0x42d8d8]
mov dword [ebp - 0x758], edx
mov eax, dword [0x42d8dc]
mov dword [ebp - 0x754], eax
mov ecx, dword [0x42d8e0]
mov dword [ebp - 0x750], ecx
push 0x425634
push 0x85
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov dword [ebp - 0x524], eax
mov edx, dword [ebp - 0x524]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x534], eax
mov eax, dword [ebp - 0x524]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x52c], eax
lea ecx, [ebp - 0x968]
push ecx
push 0
mov edx, dword [ebp - 0x52c]
push edx
mov eax, dword [ebp - 0x534]
push eax
push str.CabalMain.exe
lea ecx, [ebp - 0x420]
push ecx
lea edx, [ebp - 0x638]
push edx
push 0x42d6f8
call fcn.00403c20
add esp, 0x20
mov dword [ebp - 0x528], 0
mov eax, 1
test eax, eax
je 0x4019f6
mov ecx, dword [ebp - 0x964]
mov edx, dword [ecx]
mov dword [ebp - 0x528], edx
cmp dword [ebp - 0x528], 2
jne 0x4019de
push 0x425648
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x4019f6
push str.wait
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4019b1
lea eax, [ebp - 0x968]
push eax
call fcn.00403e00
add esp, 4
push 2
push 0
mov ecx, dword [ebp - 0x114]
push ecx
call fcn.00403e20
add esp, 0xc
mov edx, dword [ebp - 0x960]
push edx
push 4
mov eax, dword [ebp - 0x114]
push eax
call fcn.00403e20
add esp, 0xc
mov ecx, dword [ebp - 0x95c]
push ecx
push 8
mov edx, dword [ebp - 0x114]
push edx
call fcn.00403e20
add esp, 0xc
lea eax, [ebp - 0x118]
push eax
call fcn.00403e00
add esp, 4
jmp 0x401a86
push 3
push 0
mov ecx, dword [ebp - 0x114]
push ecx
call fcn.00403e20
add esp, 0xc
lea edx, [ebp - 0x118]
push edx
call fcn.00403e00
add esp, 4
push 0x425658
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040e418
mov esp, ebp
pop ebp
ret 0x10