Function at 0x4c7a90
Capabilities:
Accept command line arguments
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x60c92a
mov eax, dword fs:[0]
push eax
sub esp, 0x148
mov eax, dword [0x6687b8]
xor eax, esp
mov dword [esp + 0x140], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x6687b8]
xor eax, esp
push eax
lea eax, [esp + 0x15c]
mov dword fs:[0], eax
mov eax, dword [esp + 0x16c]
add eax, 0xfffffffe
cmp eax, 0xb
ja case.0x4c7ade.4
jmp dword [eax*4 + 0x4c8338]
mov esi, 4
jmp 0x4c7b14
mov esi, 8
jmp 0x4c7b14
mov esi, 0x40
jmp 0x4c7b14
mov esi, 1
jmp 0x4c7b14
mov esi, 2
jmp 0x4c7b14
mov esi, 0x10
jmp 0x4c7b14
mov esi, 0x20
mov dword [esp + 0x28], esi
xor ebp, ebp
lea eax, [esp + 0x20]
mov dword [esp + 0x164], ebp
call fcn.0050dc60
mov edi, eax
cmp edi, ebp
mov dword [esp + 0x1c], edi
je 0x4c7e47
lea eax, [esi - 1]
cmp eax, 0x3f
mov dword [esp + 0x78], edi
mov dword [esp + 0x24], ebp
ja case.0x4c7b53.1
movzx eax, byte [eax + 0x4c8374]
jmp dword [eax*4 + 0x4c8368]
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
lea ecx, [esp + 0x14]
push ecx
mov ecx, eax
call fcn.00409dd0
mov bl, 0xc
mov byte [esp + 0x164], bl
mov eax, dword [esp + 0x14]
cmp dword [eax - 0xc], ebp
jl 0x4c7b9b
push 0x6292b0
push eax
call fcn.005d2e73
add esp, 8
cmp eax, ebp
je 0x4c7b9b
sub eax, dword [esp + 0x14]
sar eax, 1
cmp eax, 0xffffffff
jne 0x4c7bd5
lea ecx, [esp + 0x14]
call fcn.00403870
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, dword [esp + 0x15c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x140]
xor ecx, esp
call fcn.005d28b3
add esp, 0x154
ret
lea ecx, [eax + 2]
lea esi, [esp + 0x38]
lea edx, [esp + 0x14]
call fcn.00409f40
lea edi, [esp + 0x14]
mov byte [esp + 0x164], 0xd
call fcn.0040ab90
mov ecx, esi
mov byte [esp + 0x164], bl
call fcn.00403870
mov eax, dword [esp + 0x14]
cmp dword [eax - 0xc], ebp
jl 0x4c7dfd
push str.Module
push eax
call fcn.005d2e73
add esp, 8
cmp eax, ebp
je 0x4c7dfd
sub eax, dword [esp + 0x14]
sar eax, 1
cmp eax, 0xffffffff
je 0x4c7dfd
lea ecx, [eax + 7]
lea esi, [esp + 0x3c]
mov edx, edi
call fcn.00409f40
mov byte [esp + 0x164], 0xe
call fcn.0040ab90
mov ecx, esi
call fcn.00403870
lea ecx, [esp + 0x18]
call fcn.00403890
mov byte [esp + 0x164], 0xf
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx - 0xc]
xor ebx, ebx
cmp eax, ebp
jle 0x4c7dd8
push 0x26
push ecx
call fcn.005d33c4
add esp, 8
cmp eax, ebp
je 0x4c7cf7
sub eax, dword [esp + 0x14]
sar eax, 1
mov esi, eax
cmp esi, 0xffffffff
je 0x4c7cf7
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x14]
call fcn.0041a270
lea edi, [esp + 0x18]
mov byte [esp + 0x164], 0x10
call fcn.0040ab90
lea ecx, [esp + 0x2c]
mov byte [esp + 0x164], 0xf
call fcn.00403870
lea ecx, [esi + 1]
lea esi, [esp + 0x20]
lea edx, [esp + 0x14]
call fcn.00409f40
lea edi, [esp + 0x14]
mov byte [esp + 0x164], 0x11
call fcn.0040ab90
mov ecx, esi
mov byte [esp + 0x164], 0xf
call fcn.00403870
jmp 0x4c7d12
lea eax, [esp + 0x14]
lea edi, [esp + 0x18]
call fcn.0040ab90
mov edx, 0x6244e0
lea edi, [esp + 0x14]
call fcn.00403760
push 0x6244e0
push 0x625c94
lea eax, [esp + 0x20]
push eax
call fcn.00427850
lea ecx, [esp + 0x18]
push ecx
mov ecx, str.config
call fcn.00414f20
add esp, 4
test al, al
je 0x4c7d44
or ebx, 1
jmp 0x4c7dc9
lea edx, [esp + 0x18]
push edx
mov ecx, str.skin
call fcn.00414f20
add esp, 4
test al, al
je 0x4c7d5f
or ebx, 2
jmp 0x4c7dc9
lea eax, [esp + 0x18]
push eax
mov ecx, str.phrase
call fcn.00414f20
add esp, 4
test al, al
je 0x4c7d7a
or ebx, 4
jmp 0x4c7dc9
lea ecx, [esp + 0x18]
push ecx
mov ecx, str.punc
call fcn.00414f20
add esp, 4
test al, al
je 0x4c7d95
or ebx, 8
jmp 0x4c7dc9
lea edx, [esp + 0x18]
push edx
mov ecx, str.cdictlist
call fcn.00414f20
add esp, 4
test al, al
je 0x4c7db0
or ebx, 0x10
jmp 0x4c7dc9
lea eax, [esp + 0x18]
push eax
mov ecx, str.candorder
call fcn.00414f20
add esp, 4
test al, al
je 0x4c7dc9
or ebx, 0x20
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx - 0xc]
cmp eax, ebp
jg 0x4c7c7a
mov ecx, dword [esp + 0x28]
or dword [0x683008], ebx
test dword [section..sdata], ecx
lea ecx, [esp + 0x18]
je 0x4c7e1b
mov dword [0x683004], 1
call fcn.00403870
lea ecx, [esp + 0x14]
call fcn.00403870
mov edx, dword [esp + 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
jmp 0x4c7bad
call fcn.00403870
lea ecx, [esp + 0x14]
call fcn.00403870
jmp 0x4c80b9
test dword [section..sdata], esi
je 0x4c7e51
push edi
mov dword [0x683004], 1
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
jmp 0x4c7bad
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
lea ecx, [esp + 0x18]
push ecx
mov ecx, eax
call fcn.00409dd0
mov edx, 0x6198d8
lea eax, [esp + 0x40]
mov byte [esp + 0x164], 1
call fcn.00404630
mov esi, eax
mov edx, 0x625c94
lea eax, [esp + 0xb4]
mov byte [esp + 0x164], 2
call fcn.00404630
mov edi, eax
mov edx, 0x6292b0
lea eax, [esp + 0x98]
mov byte [esp + 0x164], 3
call fcn.00404630
push eax
sub esp, 0x1c
mov byte [esp + 0x184], 4
mov edx, dword [esp + 0x38]
mov eax, esp
mov dword [esp + 0x44], esp
call fcn.00404630
mov ecx, edi
mov edx, esi
lea edi, [esp + 0x10c]
call fcn.00403a30
mov edi, 8
cmp dword [esp + 0xb0], edi
jb 0x4c7ef8
mov edx, dword [esp + 0x9c]
push edx
call fcn.005d2367
add esp, 4
mov esi, 7
mov dword [esp + 0xb0], esi
mov dword [esp + 0xac], ebp
mov word [esp + 0x9c], bp
cmp dword [esp + 0xcc], edi
jb 0x4c7f2c
mov eax, dword [esp + 0xb8]
push eax
call fcn.005d2367
add esp, 4
mov dword [esp + 0xcc], esi
mov dword [esp + 0xc8], ebp
mov word [esp + 0xb8], bp
cmp dword [esp + 0x58], edi
jb 0x4c7f55
mov ecx, dword [esp + 0x44]
push ecx
call fcn.005d2367
add esp, 4
mov dword [esp + 0x58], esi
mov dword [esp + 0x54], ebp
mov word [esp + 0x44], bp
mov dword [esp + 0xe8], esi
mov dword [esp + 0xe4], ebp
mov word [esp + 0xd4], bp
mov bl, 9
mov edx, 0x627d64
lea eax, [esp + 0x7c]
mov byte [esp + 0x164], bl
call fcn.00404630
lea edx, [esp + 0x7c]
push edx
lea eax, [esp + 0xf0]
lea edx, [esp + 0xd4]
push eax
mov ecx, edx
mov byte [esp + 0x16c], 0xa
call fcn.0045eee0
mov edi, 8
mov byte [esp + 0x164], bl
cmp dword [esp + 0x94], edi
jb 0x4c7fd7
mov ecx, dword [esp + 0x80]
push ecx
call fcn.005d2367
add esp, 4
cmp dword [esp + 0xe8], edi
mov ecx, dword [esp + 0xd4]
mov dword [esp + 0x94], esi
mov dword [esp + 0x90], ebp
mov word [esp + 0x80], bp
jae 0x4c8004
lea ecx, [esp + 0xd4]
lea edx, [esp + 0x34]
push edx
call fcn.00409dd0
lea eax, [esp + 0x34]
push eax
mov byte [esp + 0x168], 0xb
call fcn.004c75e0
mov dword [esp + 0x28], eax
mov byte [esp + 0x168], bl
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
add esp, 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4c804e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esp + 0xe8], edi
jb 0x4c8067
mov ecx, dword [esp + 0xd4]
push ecx
call fcn.005d2367
add esp, 4
lea ecx, [esp + 0xec]
mov dword [esp + 0xe8], esi
mov dword [esp + 0xe4], ebp
mov word [esp + 0xd4], bp
mov byte [esp + 0x164], 1
call fcn.00403ba0
mov byte [esp + 0x164], 0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4c80b9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x1c]
mov edi, dword [esp + 0x28]
or dword [section..sdata], edi
push 0xffffffffffffffff
push eax
mov dword [esp + 0x34], eax
mov byte [esp + 0x38], 0
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, ebp
je 0x4c80e4
cmp eax, 0x80
jne 0x4c80e9
mov byte [esp + 0x30], 1
mov ecx, edi
not ecx
mov byte [esp + 0x164], 0x12
and dword [section..sdata], ecx
lea eax, [edi - 1]
cmp eax, 0x3f
ja case.0x4c810e.3
movzx edx, byte [eax + 0x4c83d4]
jmp dword [edx*4 + 0x4c83b4]
mov ebx, dword [esp + 0x24]
test bl, 0xc7
jne 0x4c8131
lea esi, [esp + 0x2c]
call fcn.00455d40
mov eax, dword [esp + 0x1c]
push eax
jmp 0x4c7ba5
push 0x1800
call fcn.005d2776
add esp, 4
mov dword [esp + 0x20], eax
mov byte [esp + 0x164], 0x13
test eax, eax
je 0x4c82a8
push ebx
push eax
mov ecx, edi
call fcn.004c9520
jmp 0x4c82aa
mov ebx, dword [esp + 0x24]
test bl, 0xc7
jne 0x4c817c
lea esi, [esp + 0x2c]
call fcn.00455d40
mov ecx, dword [esp + 0x1c]
push ecx
jmp 0x4c7ba5
push 0x1800
call fcn.005d2776
add esp, 4
mov dword [esp + 0x20], eax
mov byte [esp + 0x164], 0x14
jmp 0x4c814a
mov ebx, dword [esp + 0x24]
test bl, 0x38
jne 0x4c81b3
lea esi, [esp + 0x2c]
call fcn.00455d40
mov edx, dword [esp + 0x1c]
push edx
jmp 0x4c7ba5
push 0x1880
call fcn.005d2776
add esp, 4
mov dword [esp + 0x20], eax
mov byte [esp + 0x164], 0x15
test eax, eax
je 0x4c82a8
push ebx
push eax
mov ecx, edi
call fcn.004c9ae0
jmp 0x4c82aa
mov ebx, dword [esp + 0x24]
test bl, 0x38
je 0x4c811e
push 0x1880
call fcn.005d2776
add esp, 4
mov dword [esp + 0x20], eax
mov byte [esp + 0x164], 0x16
jmp 0x4c81cc
mov ebx, dword [esp + 0x24]
test bl, 0x38
je 0x4c8169
push 0x17f8
call fcn.005d2776
add esp, 4
mov dword [esp + 0x20], eax
test eax, eax
mov byte [esp + 0x164], 0x17
je 0x4c82a8
push ebx
push edi
push eax
call fcn.004ca8d0
jmp 0x4c82aa
mov ebx, dword [esp + 0x24]
test bl, bl
je 0x4c81a0
push 0x1890
call fcn.005d2776
add esp, 4
mov dword [esp + 0x20], eax
test eax, eax
mov byte [esp + 0x164], 0x18
je 0x4c82a8
push ebx
push edi
push eax
call fcn.004ca9d0
jmp 0x4c82aa
mov esi, dword [0x683008]
push 0x17f8
mov dword [0x683008], 0
call fcn.005d2776
add esp, 4
mov dword [esp + 0x20], eax
test eax, eax
mov byte [esp + 0x164], 0x19
je 0x4c82a8
push esi
push edi
push eax
call fcn.004c9750
jmp 0x4c82aa
xor eax, eax
mov ebp, eax
xor esi, esi
cmp ebp, esi
mov byte [esp + 0x164], 0x12
je case.0x4c810e.3
mov edi, ebp
call fcn.004cb8a0
cmp eax, esi
je 0x4c8305
mov dword [esp + 0x40], vtable.WTL::CMessageLoop.0
mov dword [esp + 0x44], esi
mov dword [esp + 0x48], esi
mov dword [esp + 0x4c], esi
mov dword [esp + 0x50], esi
mov dword [esp + 0x54], esi
mov dword [esp + 0x58], esi
lea edi, [esp + 0x40]
mov byte [esp + 0x164], 0x1a
call fcn.004cbe90
mov esi, edi
mov byte [esp + 0x164], 0x12
call fcn.004c8420
mov eax, dword [ebp]
mov edx, dword [eax + 4]
push 1
mov ecx, ebp
call edx
cmp byte [esp + 0x30], 0
je 0x4c8323
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
jmp 0x4c7bad