Function at 0x401c50
Capabilities:
Accept command line arguments
Check if file exists
Create process on windows
Create thread
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x429e49
mov eax, dword fs:[0]
push eax
sub esp, 0x4f0
mov eax, dword [0x436b68]
xor eax, ebp
mov dword [ebp - 0x14], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x4f0], ecx
mov ecx, dword [ebp - 0x4f0]
call fcn.0041196e
mov byte [ebp - 0x4d], 0
lea ecx, [ebp - 0x30]
call fcn.00403320
mov dword [ebp - 4], 0
mov eax, dword [0x43a1e0]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x47c], 1
jmp 0x401cc2
mov ecx, dword [ebp - 0x47c]
add ecx, 1
mov dword [ebp - 0x47c], ecx
mov edx, dword [ebp - 0x47c]
cmp edx, dword [0x43a1e0]
jge 0x401d4a
mov eax, dword [ebp - 0x47c]
mov ecx, dword [0x43a1e4]
mov edx, dword [ecx + eax*4]
mov dword [ebp - 0x49c], edx
mov eax, dword [ebp - 0x49c]
push eax
lea ecx, [ebp - 0x498]
call fcn.004030f0
mov byte [ebp - 4], 1
push 0
push str._update
lea ecx, [ebp - 0x498]
call fcn.00402470
cmp eax, 0xffffffff
je 0x401d27
mov byte [ebp - 0x4d], 1
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x498]
call fcn.00403130
jmp 0x401cb3
lea ecx, [ebp - 0x498]
push ecx
lea ecx, [ebp - 0x30]
call fcn.004022c0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x498]
call fcn.00403130
jmp 0x401cb3
lea ecx, [ebp - 0x478]
call fcn.00403320
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x30]
call fcn.00402450
movzx edx, al
test edx, edx
jne 0x401d97
push 0x42f5c0
lea ecx, [ebp - 0x478]
call fcn.004022e0
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x478]
call fcn.004022c0
push 0x42f5c4
lea ecx, [ebp - 0x478]
call fcn.004022e0
push 0x104
push 0x43ad50
mov ecx, dword [ebp - 0x4f0]
mov edx, dword [ecx + 0x44]
push edx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x401dc0
push 0x43ad50
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
mov byte [ebp - 0x454], 0
push 0x3ff
push 0
lea eax, [ebp - 0x453]
push eax
call fcn.00419a10
add esp, 0xc
push 0x43ad50
lea ecx, [ebp - 0x4c]
call fcn.004030f0
mov byte [ebp - 4], 3
push str.update.ini
lea ecx, [ebp - 0x4c]
call fcn.004022e0
push 0x400
push 0
lea ecx, [ebp - 0x454]
push ecx
call fcn.00419a10
add esp, 0xc
lea ecx, [ebp - 0x4c]
call fcn.004029f0
push eax
push 0x400
lea edx, [ebp - 0x454]
push edx
push 0x42f5d4
push 0x42f5d8
push 0x42f5dc
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea eax, [ebp - 0x454]
push eax
mov ecx, dword [ebp - 0x4f0]
add ecx, 0xa4
call fcn.004029d0
push 0x400
push 0
lea ecx, [ebp - 0x454]
push ecx
call fcn.00419a10
add esp, 0xc
lea ecx, [ebp - 0x4c]
call fcn.004029f0
push eax
push 0x400
lea edx, [ebp - 0x454]
push edx
push 0x42f5e4
push str.cver
push 0x42f5f0
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea eax, [ebp - 0x454]
push eax
mov ecx, dword [ebp - 0x4f0]
add ecx, 0xc0
call fcn.004029d0
push 0x400
push 0
lea ecx, [ebp - 0x454]
push ecx
call fcn.00419a10
add esp, 0xc
lea ecx, [ebp - 0x4c]
call fcn.004029f0
push eax
push 0x400
lea edx, [ebp - 0x454]
push edx
push 0x42f5f8
push str.path
push str.config
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea eax, [ebp - 0x454]
push eax
mov ecx, dword [ebp - 0x4f0]
add ecx, 0xdc
call fcn.004029d0
push 0x42f60c
mov ecx, dword [ebp - 0x4f0]
call fcn.00412059
push 0x44c
call fcn.004029b0
mov dword [ebp - 0x4c8], eax
mov byte [ebp - 4], 4
cmp dword [ebp - 0x4c8], 0
je 0x401f45
push 0
mov ecx, dword [ebp - 0x4c8]
call fcn.00403390
mov dword [ebp - 0x4f4], eax
jmp 0x401f4f
mov dword [ebp - 0x4f4], 0
mov ecx, dword [ebp - 0x4f4]
mov dword [ebp - 0x4c4], ecx
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x4c4]
mov dword [ebp - 0x54], edx
mov eax, dword [ebp - 0x4f0]
mov ecx, dword [ebp - 0x54]
mov dword [eax + 0x20], ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [ebp - 0x458], eax
push 0
push 0x66
mov edx, dword [ebp - 0x54]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x54]
mov edx, dword [eax + 0x13c]
call edx
movzx eax, byte [ebp - 0x4d]
test eax, eax
je 0x401fb1
push 0x42f0d1
lea ecx, [ebp - 0x478]
call fcn.004029d0
jmp 0x402039
lea ecx, [ebp - 0x478]
call fcn.00402a50
shl eax, 1
push eax
lea ecx, [ebp - 0x478]
call fcn.00402400
mov dword [ebp - 0x4a0], 0
jmp 0x401fe5
mov ecx, dword [ebp - 0x4a0]
add ecx, 1
mov dword [ebp - 0x4a0], ecx
lea ecx, [ebp - 0x478]
call fcn.00402a50
cmp dword [ebp - 0x4a0], eax
jae 0x402039
mov edx, dword [ebp - 0x4a0]
push edx
lea ecx, [ebp - 0x478]
call fcn.004023d0
movsx eax, byte [eax]
cmp eax, 0x5c
jne 0x402037
push 0x5c
push 1
mov ecx, dword [ebp - 0x4a0]
push ecx
lea ecx, [ebp - 0x478]
call fcn.00402310
mov edx, dword [ebp - 0x4a0]
add edx, 1
mov dword [ebp - 0x4a0], edx
jmp 0x401fd6
movzx eax, byte [ebp - 0x4d]
test eax, eax
je 0x40207e
lea ecx, [ebp - 0x45c]
push ecx
push 0
push 1
push 0x408790
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 1
mov ecx, dword [ebp - 0x54]
call fcn.00403b10
push 5
mov ecx, dword [ebp - 0x54]
call fcn.0040fa31
mov edx, dword [ebp - 0x54]
mov dword [edx + 0x7c], 1
jmp 0x402269
mov ecx, dword [ebp - 0x4f0]
add ecx, 0xdc
call fcn.004029f0
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x40221b
push 0x42f62c
mov eax, dword [ebp - 0x4f0]
add eax, 0xdc
push eax
lea ecx, [ebp - 0x4e4]
push ecx
call fcn.00402770
add esp, 0xc
mov dword [ebp - 0x4f8], eax
mov edx, dword [ebp - 0x4f8]
mov dword [ebp - 0x4fc], edx
mov byte [ebp - 4], 5
lea eax, [ebp - 0x478]
push eax
mov ecx, dword [ebp - 0x4fc]
push ecx
lea edx, [ebp - 0x4bc]
push edx
call fcn.00402800
add esp, 0xc
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x4e4]
call fcn.00403130
push 0x3c
call fcn.0040a126
add esp, 4
mov dword [ebp - 0x4e8], eax
mov eax, dword [ebp - 0x4e8]
mov dword [ebp - 0x4c0], eax
mov ecx, dword [ebp - 0x4c0]
mov dword [ecx], 0x3c
mov edx, dword [ebp - 0x4c0]
mov dword [edx + 4], 0x4008340
mov eax, dword [ebp - 0x4c0]
mov dword [eax + 8], 0
mov ecx, dword [ebp - 0x4c0]
mov dword [ecx + 0xc], str.open
mov ecx, dword [ebp - 0x4f0]
add ecx, 0xdc
call fcn.004029f0
mov edx, dword [ebp - 0x4c0]
mov dword [edx + 0x10], eax
lea ecx, [ebp - 0x478]
call fcn.004029f0
mov ecx, dword [ebp - 0x4c0]
mov dword [ecx + 0x14], eax
mov edx, dword [ebp - 0x4c0]
mov dword [edx + 0x18], 0
mov eax, dword [ebp - 0x4c0]
mov dword [eax + 0x1c], 5
mov ecx, dword [ebp - 0x4c0]
mov dword [ecx + 0x20], 0
mov edx, dword [ebp - 0x4c0]
mov dword [edx + 0x24], 0
mov eax, dword [ebp - 0x4c0]
mov dword [eax + 0x28], 0
mov ecx, dword [ebp - 0x4c0]
mov dword [ecx + 0x2c], 0
mov edx, dword [ebp - 0x4c0]
mov dword [edx + 0x30], 0
mov eax, dword [ebp - 0x4c0]
mov dword [eax + 0x34], 0
mov ecx, dword [ebp - 0x4c0]
mov dword [ecx + 0x34], 0
mov edx, dword [ebp - 0x4c0]
mov dword [edx + 0x38], 0
mov eax, dword [ebp - 0x4c0]
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x4bc]
call fcn.00403130
lea ecx, [ebp - 0x45c]
push ecx
push 0
push 1
push 0x408790
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 0x400
push 0
lea edx, [ebp - 0x454]
push edx
call fcn.00419a10
add esp, 0xc
push 0
mov ecx, dword [ebp - 0x54]
call fcn.00403b10
push 0
mov ecx, dword [ebp - 0x54]
call fcn.0040fa31
mov eax, dword [ebp - 0x54]
mov dword [eax + 0x7c], 0
mov dword [ebp - 0x4ec], 1
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x4c]
call fcn.00403130
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x478]
call fcn.00403130
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x30]
call fcn.00403130
mov eax, dword [ebp - 0x4ec]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00417fbe
mov esp, ebp
pop ebp
ret