Function at 0x401940
Capabilities:
Accept command line arguments
Write file on windows

Disassembly:
sub esp, 0x298
push ebx
push ebp
push esi
push edi
mov ebx, ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
mov ecx, ebx
call fcn.00401c30
test eax, eax
je 0x401c17
lea ebp, [ebx + 0xa94]
or ecx, 0xffffffff
mov edi, ebp
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 3
jb 0x401bba
mov ecx, 0x40
lea edi, [esp + 0x15]
mov byte [esp + 0x14], al
mov esi, 0x406250
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, ebp
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x4019ba
test cl, cl
je 0x4019b6
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x4019ba
add eax, 2
add esi, 2
test cl, cl
jne 0x401996
xor eax, eax
jmp 0x4019bf
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x401a1e
mov esi, 0x40624c
mov eax, ebp
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x4019ee
test cl, cl
je 0x4019ea
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x4019ee
add eax, 2
add esi, 2
test cl, cl
jne 0x4019ca
xor eax, eax
jmp 0x4019f3
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x401a1e
lea edi, [ebx + 0xa97]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x14]
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
jmp 0x401ab6
call sub.MFC42.DLL_AfxGetModuleState
mov eax, dword [eax + 8]
lea ecx, [esp + 0x14]
push 0x104
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [esp + 0x14]
push 0x5c
push edx
call dword [sym.imp.MSVCRT.dll_strrchr]
mov edi, eax
lea eax, [esp + 0x1c]
mov ecx, edi
add esp, 8
sub ecx, eax
xor eax, eax
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
lea edx, [esp + 0x14]
and ecx, 3
rep stosb byte es:[edi], al
mov edi, 0x406198
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea edx, [esp + 0x14]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.setup.log
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
push 0
push 0x80
push 2
push 0
and ecx, 3
push 1
lea eax, [esp + 0x28]
push 0x40000000
rep movsb byte es:[edi], byte [esi]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x401c17
mov esi, 0x40623c
lea eax, [ebx + 0xb98]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x401b12
test cl, cl
je 0x401b0e
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x401b12
add eax, 2
add esi, 2
test cl, cl
jne 0x401aee
xor eax, eax
jmp 0x401b17
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x401b24
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 4]
jmp 0x401b2c
mov edx, dword [ebx]
push 1
mov ecx, ebx
call dword [edx]
mov esi, eax
mov ecx, 0x63
xor eax, eax
lea edi, [esp + 0x119]
mov byte [esp + 0x118], 0
lea edx, [ebx + 0x8a0]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, esi
lea ecx, [ebx + 0x8f0]
neg eax
sbb eax, eax
add ebx, 0x828
neg eax
dec eax
push eax
push ecx
push edx
push ebx
lea eax, [esp + 0x128]
push str._Application__r_nName_s_r_nVersion_s_r_nCompany_s_r_n_r_n_ResponseResult__r_nResultCode_d_r_n
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x18
lea ecx, [esp + 0x10]
lea edi, [esp + 0x118]
xor eax, eax
push 0
push ecx
or ecx, 0xffffffff
lea edx, [esp + 0x120]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x298
ret
mov esi, 0x40623c
lea eax, [ebx + 0xb98]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x401be9
test cl, cl
je 0x401be5
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x401be9
add eax, 2
add esi, 2
test cl, cl
jne 0x401bc5
xor eax, eax
jmp 0x401bee
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x401c04
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 4]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x298
ret
mov edx, dword [ebx]
push 1
mov ecx, ebx
call dword [edx]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x298
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x298
ret