Function at 0x403980
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4040d0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x228
push ebx
push esi
push edi
xor esi, esi
mov dword [ebp - 0x10], esp
push esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
push esi
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call sub.MFC42.DLL_AfxWinInit
cmp eax, esi
jne 0x4039db
lea eax, [ebp - 0x30]
push 0x405278
push eax
mov dword [ebp - 0x30], str.Error:_MFC_initialization_failed_
call sub.MSVCRT.dll__CxxThrowException
call fcn.00401210
cmp eax, esi
mov dword [0x40774c], eax
jne 0x4039fe
lea ecx, [ebp - 0x24]
push 0x405278
push ecx
mov dword [ebp - 0x24], str.Error:_Could_not_retrieve_the_Selected_Path.
call sub.MSVCRT.dll__CxxThrowException
push esi
push eax
call dword [sym.imp.MSVCRT.dll__access]
add esp, 8
test eax, eax
je 0x403a40
mov edx, dword [0x40774c]
lea eax, [ebp - 0x234]
push edx
push str.Error:_Data_directory___s__does_not_exist_
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea edx, [ebp - 0x1c]
lea ecx, [ebp - 0x234]
push 0x405278
push edx
mov dword [ebp - 0x1c], ecx
call sub.MSVCRT.dll__CxxThrowException
mov edi, dword [0x40774c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, str.LOGSetkmisc98.log
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [edx + ecx + 1]
push eax
call dword [sym.imp.MSVCRT.dll_malloc]
mov edx, eax
add esp, 4
cmp edx, esi
mov dword [0x407750], edx
jne 0x403a8e
lea ecx, [ebp - 0x2c]
push 0x405278
push ecx
mov dword [ebp - 0x2c], str.Error:_Could_not_allocate_memory_for_log_filename.
call sub.MSVCRT.dll__CxxThrowException
mov edi, dword [0x40774c]
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, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.LOGSetkmisc98.log
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [ebp - 0x14]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.MSVCRT.dll_time]
lea ecx, [ebp - 0x14]
push ecx
call dword [sym.imp.MSVCRT.dll_ctime]
add esp, 8
lea edx, [ebp - 0x234]
push eax
push str.Start_Time:__s
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
lea eax, [ebp - 0x234]
push eax
call fcn.00401000
mov eax, dword [ebp + 8]
add esp, 0x10
cmp eax, 2
je 0x403b31
lea ecx, [ebp - 0x20]
push 0x405278
push ecx
mov dword [ebp - 0x20], str.Error:_An_incorrect_number_of_arguments_were_specified_on_the_command_line.
call sub.MSVCRT.dll__CxxThrowException
mov ebx, dword [ebp + 0xc]
mov edi, dword [sym.imp.MSVCRT.dll__strupr]
mov esi, 0x407534
mov edx, dword [ebx + 4]
push edx
call edi
add esp, 4
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x403b6c
test cl, cl
je 0x403b68
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x403b6c
add eax, 2
add esi, 2
test cl, cl
jne 0x403b48
xor eax, eax
jmp 0x403b71
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x403bcc
push 1
call fcn.004017c0
add esp, 4
lea edx, [ebp - 0x14]
push edx
call dword [sym.imp.MSVCRT.dll_time]
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.MSVCRT.dll_ctime]
add esp, 8
lea ecx, [ebp - 0x234]
push eax
push str._nCompletion_Time:__s
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
lea edx, [ebp - 0x234]
push edx
call fcn.00401000
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x18]
add esp, 0x10
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebx + 4]
mov esi, 0x407518
push eax
call edi
add esp, 4
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x403bfe
test cl, cl
je 0x403bfa
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x403bfe
add eax, 2
add esi, 2
test cl, cl
jne 0x403bda
xor eax, eax
jmp 0x403c03
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x403c0d
push eax
jmp 0x403b77
mov eax, dword [ebx + 4]
mov esi, 0x407514
push eax
call edi
add esp, 4
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x403c3f
test cl, cl
je 0x403c3b
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x403c3f
add eax, 2
add esi, 2
test cl, cl
jne 0x403c1b
xor eax, eax
jmp 0x403c44
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x403c57
call fcn.00402ac0
call fcn.004037f0
jmp 0x403b7f
mov eax, dword [ebx + 4]
mov esi, 0x407510
push eax
call edi
add esp, 4
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x403c89
test cl, cl
je 0x403c85
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x403c89
add eax, 2
add esi, 2
test cl, cl
jne 0x403c65
xor eax, eax
jmp 0x403c8e
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x403c9c
call fcn.00402240
jmp 0x403b7f
mov eax, dword [ebx + 4]
mov esi, 0x40750c
push eax
call edi
add esp, 4
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x403cce
test cl, cl
je 0x403cca
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x403cce
add eax, 2
add esi, 2
test cl, cl
jne 0x403caa
xor eax, eax
jmp 0x403cd3
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x403ce1
call fcn.00401a80
jmp 0x403b7f
mov eax, dword [ebx + 4]
lea ecx, [ebp - 0x234]
push eax
push str.Error:_An_unknown_argument___s__was_specified_by_the_user.
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea eax, [ebp - 0x28]
lea edx, [ebp - 0x234]
push 0x405278
push eax
mov dword [ebp - 0x28], edx
call sub.MSVCRT.dll__CxxThrowException
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x18], 1
push ecx
call fcn.00401000
add esp, 4
mov eax, 0x403b7f
ret