Function at 0x4035c0
Capabilities:
Accept command line arguments

Disassembly:
sub esp, 0x20
push ebx
push ebp
push esi
mov esi, dword [esp + 0x30]
cmp esi, 0x7d1
push edi
jg 0x403766
je 0x40371b
lea eax, [esi - 0x3ea]
cmp eax, 4
ja case.0x40377d.2014
jmp dword [eax*4 + 0x4039e0]
push 0x104
push 0x406be8
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x403641
push 0x5c
push 0x406be8
call sub.MSVCR100.dll_strrchr
add esp, 8
inc eax
or ecx, 0xffffffff
mov byte [eax], 0
lea edi, [eax + 1]
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, 0x406ae4
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x40364f
mov byte [0x406be8], 0
mov byte [0x406ae4], 0
mov eax, dword [esp + 0x38]
dec eax
je 0x4036ca
sub eax, 0x7d0
je 0x403697
dec eax
jne case.default.0x4037f0
mov edi, 0x406ae4
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, 0x406ae4
mov edx, ecx
mov esi, edi
mov edi, dword [esp + 0x3c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 0xc
mov edi, 0x406be8
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x3c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, 0x406be8
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 0xc
mov edi, 0x406be8
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, 0x406be8
mov edx, ecx
mov esi, edi
mov edi, dword [esp + 0x3c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 0xc
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x20
ret 0xc
pop edi
pop esi
pop ebp
mov eax, 4
pop ebx
add esp, 0x20
ret 0xc
mov ecx, dword [esp + 0x38]
mov edx, dword [ecx + 8]
mov eax, dword [ecx]
cmp edx, 0x80000401
je 0x403819
cmp edx, 0x80000501
je 0x403755
cmp edx, 0x80000601
jne 0x403819
fld qword [ecx]
call sub.MSVCR100.dll__ftol
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 0xc
fld dword [ecx]
call sub.MSVCR100.dll__ftol
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 0xc
lea eax, [esi - 0x7d2]
cmp eax, 0x1f
ja case.0x40377d.2014
xor ecx, ecx
mov cl, byte [eax + 0x403a28]
jmp dword [ecx*4 + 0x4039f4]
mov edx, dword [esp + 0x38]
push edx
call fcn.00403110
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 0xc
mov eax, dword [esp + 0x38]
push eax
call fcn.00403250
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 0xc
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x38]
push ecx
push edx
call fcn.004031a0
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 0xc
mov eax, dword [esp + 0x38]
cmp eax, 0x80000201
ja 0x403823
je case.0x4037f0.2147483646
cmp eax, 0x80000006
ja 0x403810
je case.0x4037f0.2147483646
add eax, 0x7ffffffe
cmp eax, 3
ja case.default.0x4037f0
jmp dword [eax*4 + 0x403a48]
mov eax, dword [esp + 0x3c]
push eax
call fcn.00403560
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 0xc
cmp eax, 0x80000101
je case.0x4037f0.2147483646
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 0xc
cmp eax, 0x80000501
ja 0x40383a
je case.0x4037f0.2147483646
cmp eax, 0x80000301
je case.0x4037f0.2147483646
cmp eax, 0x80000401
jmp 0x403815
cmp eax, 0x80000601
jne case.default.0x4037f0
mov ecx, dword [esp + 0x3c]
push ecx
call fcn.00403250
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 0xc
mov edx, dword [esp + 0x38]
push edx
call fcn.004030f0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 0xc
mov eax, dword [esp + 0x38]
lea ecx, [esp + 0x34]
push 0x404670
push ecx
mov dword [0x406774], eax
mov dword [esp + 0x3c], 0
call sub.MSVCR100.dll__CxxThrowException
pop edi
pop esi
pop ebp
mov eax, 3
pop ebx
add esp, 0x20
ret 0xc
mov ebp, dword [sym.imp.USER32.dll_PeekMessageA]
push 0
push 0
push 0
lea edx, [esp + 0x20]
push 0
push edx
call ebp
test eax, eax
je case.default.0x4037f0
mov esi, dword [sym.imp.USER32.dll_GetMessageA]
mov edi, dword [sym.imp.USER32.dll_TranslateMessage]
mov ebx, dword [sym.imp.USER32.dll_DispatchMessageA]
cmp dword [esp + 0x18], 0x12
je case.default.0x4037f0
push 0
push 0
lea eax, [esp + 0x1c]
push 0
push eax
call esi
lea ecx, [esp + 0x14]
push ecx
call edi
lea edx, [esp + 0x14]
push edx
call ebx
push 0
push 0
push 0
lea eax, [esp + 0x20]
push 0
push eax
call ebp
test eax, eax
jne 0x4038d1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 0xc
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dl, byte [eax]
inc eax
cmp dl, 0x22
mov cl, 0x20
jne 0x403926
mov cl, dl
mov dl, byte [eax]
inc eax
cmp dl, cl
je 0x403934
mov dl, byte [eax]
inc eax
cmp dl, cl
jne 0x40392d
cmp cl, 0x20
je 0x403819
cmp byte [eax], 0x20
jne 0x403819
pop edi
pop esi
pop ebp
inc eax
pop ebx
add esp, 0x20
ret 0xc
push 0x104
push 0x406be8
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je case.default.0x4037f0
push 0x5c
push 0x406be8
call sub.MSVCR100.dll_strrchr
add esp, 8
mov byte [eax], 0
mov eax, 0x406be8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 0xc
push 0x104
push 0x406be8
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je case.default.0x4037f0
push 0x5c
push 0x406be8
call sub.MSVCR100.dll_strrchr
add esp, 8
mov byte [eax], 0
inc eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 0xc
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea eax, [esp + 0x10]
push 0x404670
push eax
mov dword [esp + 0x18], esi
call sub.MSVCR100.dll__CxxThrowException
mov edi, edi
pop ss
cmp byte [eax], al
pop ss
cmp byte [eax], al
std
inc eax
add byte [edi + esi], cl
inc eax
add bl, dh
xor eax, 0x39140040
inc eax
add byte [ecx + 0x39], dl
inc eax
add byte [ecx + edi + 0x38a20040], cl
inc eax
add al, dl
aaa
inc eax
add byte [edi + esi + 0x379b0040], al
inc eax
add byte [edi + esi + 0x385a0040], dh
inc eax
add byte [ebx + 0x38], dh
inc eax
add byte [ebx + 0x17004038], dl
cmp byte [eax], al
ret