Function at 0x407000
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4099f1
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x660
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov edi, dword [sym.imp.MSVCIRT.dll_public:_void___thiscall_fstream::constructor_void_]
push 1
lea ecx, [esp + 0x80]
call edi
xor ebx, ebx
push 1
lea ecx, [esp + 0x148]
mov dword [esp + 0x67c], ebx
call edi
lea ecx, [esp + 0x1c]
mov byte [esp + 0x678], 1
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x58], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x3c], ebx
call sub.MFC42.DLL_CString::CString_1
lea ecx, [esp + 0x20]
mov byte [esp + 0x678], 2
call sub.MFC42.DLL_CString::CString_1
push fcn.0040845c
push sub.MFC42.DLL_CString::CString_1
push 0x32
lea eax, [esp + 0x1b4]
push 4
push eax
mov byte [esp + 0x68c], 3
call fcn.00408870
mov ecx, dword [sym.imp.MSVCIRT.dll_int_const_filebuf::openprot]
mov eax, dword [esi + 4]
mov edi, dword [sym.imp.MSVCIRT.dll_public:_void___thiscall_fstream::open_char_const___int__int_]
mov byte [esp + 0x678], 4
mov edx, dword [ecx]
lea ecx, [esp + 0x7c]
push edx
push 1
push eax
call edi
mov ecx, dword [sym.imp.MSVCIRT.dll_int_const_filebuf::openprot]
mov eax, dword [esi + 8]
mov edx, dword [ecx]
lea ecx, [esp + 0x144]
push edx
push 2
push eax
call edi
lea ecx, [esp + 0x28]
call sub.MFC42.DLL_CString::CString_1
push 0x66
lea ecx, [esp + 0x2c]
mov byte [esp + 0x67c], 5
call sub.MFC42.DLL_CString::LoadStringA
mov eax, dword [esp + 0x28]
mov ecx, dword [eax - 8]
push ecx
push eax
lea ecx, [esp + 0x158]
call dword [sym.imp.MSVCIRT.dll_public:_class_ostream____thiscall_ostream::write_char_const___int_]
lea eax, [esp + 0x150]
push eax
call dword [sym.imp.MSVCIRT.dll_class_ostream____cdecl_endl_class_ostream__]
mov ecx, dword [esp + 0x80]
add esp, 4
mov eax, dword [ecx + 4]
lea edx, [ecx + 4]
test byte [esp + eax + 0x84], 1
jne 0x40794d
jmp 0x407166
xor ebx, ebx
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x270]
rep stosd dword es:[edi], eax
mov ecx, dword [edx]
lea eax, [esp + ecx + 0x7c]
mov ecx, dword [esp + ecx + 0xb0]
cmp ecx, ebx
jge 0x407194
add eax, 0x38
push eax
call dword [sym.imp.MSVCIRT.dll__mtlock]
add esp, 4
mov ecx, dword [esp + 0x80]
push 0xa
inc ecx
lea edx, [esp + 0x274]
mov dword [esp + 0x84], ecx
push 0x400
push edx
lea ecx, [esp + 0x88]
call dword [sym.imp.MSVCIRT.dll_protected:_class_istream____thiscall_istream::get_char___int__int_]
mov eax, dword [esp + 0x7c]
mov ecx, dword [eax + 4]
lea eax, [esp + ecx + 0x7c]
mov ecx, dword [esp + ecx + 0xb0]
cmp ecx, ebx
jge 0x4071e2
add eax, 0x38
push eax
call dword [sym.imp.MSVCIRT.dll__mtunlock]
add esp, 4
lea edi, [esp + 0x270]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x40794d
lea edx, [esp + 0x270]
lea ecx, [esp + 0x18]
push edx
call sub.MFC42.DLL_CString::CString_2
lea edi, [esp + 0x270]
or ecx, 0xffffffff
xor eax, eax
mov byte [esp + 0x678], 6
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 0x84
jne 0x4073de
cmp dword [0x40db4c], 2
jne 0x40793c
push 0x40d0d4
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::Find_1
mov edi, eax
mov ebx, 1
cmp edi, 0xffffffff
je 0x4072f5
lea ebp, [esp + 0x1ac]
test edi, edi
jne 0x407273
push 0x40db50
mov ecx, ebp
call fcn.00408468
jmp 0x4072a5
push edi
lea eax, [esp + 0x6c]
push 0
push eax
lea ecx, [esp + 0x24]
call sub.MFC42.DLL_CString::Mid_1
push eax
mov ecx, ebp
mov byte [esp + 0x67c], 7
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x68]
mov byte [esp + 0x678], 6
call fcn.0040845c
inc edi
lea ecx, [esp + 0x64]
push edi
push ecx
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::Mid
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x67c], 8
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x64]
mov byte [esp + 0x678], 6
call fcn.0040845c
push 0x40d0d4
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::Find_1
mov edi, eax
inc ebx
add ebp, 4
cmp edi, 0xffffffff
jne 0x407261
lea edx, [esp + 0x18]
lea ecx, [esp + ebx*4 + 0x1a8]
push edx
call sub.MFC42.DLL_CString::operator_1
lea edi, [esi + 0x10]
lea eax, [esp + 0x1ac]
push eax
mov ecx, edi
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x1b0]
push ecx
lea ecx, [esi + 0x20]
call sub.MFC42.DLL_CString::operator_1
lea edx, [esp + 0x1b4]
lea ecx, [esi + 0x1c]
push edx
call sub.MFC42.DLL_CString::operator_1
mov eax, dword [esp + 0x1b8]
push eax
call dword [sym.imp.MSVCRT.dll_atof]
fmul qword [0x40aa58]
push ecx
lea ecx, [esp + 0x1c0]
fst dword [esp + 0x1c]
fstp qword [esp]
push str._.1f
push ecx
call sub.MFC42.DLL_CString::Format
add esp, 0x10
lea edx, [esp + 0x1b8]
lea ecx, [esi + 0x24]
push edx
call sub.MFC42.DLL_CString::operator_1
mov eax, dword [esp + 0x1c4]
push eax
call dword [sym.imp.MSVCRT.dll_atoi]
push eax
lea ecx, [esp + 0x1cc]
push 0x40d0d8
push ecx
mov dword [esp + 0x34], eax
call sub.MFC42.DLL_CString::Format
add esp, 0x10
lea edx, [esp + 0x1c4]
lea ecx, [esi + 0x38]
push edx
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x1c0]
call sub.MFC42.DLL_CString::TrimLeft
lea ecx, [esp + 0x1c0]
call sub.MFC42.DLL_CString::TrimRight
lea eax, [esp + 0x1c0]
lea ecx, [esi + 0x14]
push eax
call sub.MFC42.DLL_CString::operator_1
jmp 0x4078c1
lea edi, [esp + 0x270]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 0xad
jne 0x40752d
cmp dword [0x40db4c], 1
jne 0x40793c
mov ebp, dword [sym.imp.MSVCRT.dll_strncpy]
lea ecx, [esp + 0x272]
push 4
lea edx, [esp + 0xe4]
push ecx
push edx
call ebp
mov ebx, dword [sym.imp.MSVCRT.dll_atoi]
lea eax, [esp + 0xec]
push eax
mov byte [esp + 0xf4], 0
call ebx
lea edi, [esi + 0x10]
push eax
push 0x40d0d8
push edi
mov dword [esp + 0x48], eax
call sub.MFC42.DLL_CString::Format
lea ecx, [esp + 0x2d7]
push 7
lea edx, [esp + 0x100]
push ecx
push edx
call ebp
lea eax, [esp + 0x108]
mov byte [esp + 0x10f], 0
push eax
call ebx
cdq
push edx
push eax
lea ecx, [esi + 0x1c]
push str._I64d
push ecx
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], edx
call sub.MFC42.DLL_CString::Format
lea edx, [esp + 0x2b4]
push 6
lea eax, [esp + 0x120]
push edx
push eax
call ebp
add esp, 0x48
lea ecx, [esp + 0xe0]
mov byte [esp + 0xe6], 0
push ecx
call ebx
mov dword [esp + 0x18], eax
push ecx
fild dword [esp + 0x1c]
lea edx, [esi + 0x24]
fst dword [esp + 0x1c]
fstp qword [esp]
push str._.0f
push edx
call sub.MFC42.DLL_CString::Format
add esp, 0x10
xor eax, eax
cmp byte [esp + eax + 0x2e4], 0x2c
jne 0x4074ea
mov byte [esp + eax + 0x2e4], 0x20
inc eax
cmp eax, 0x1c
jl 0x4074d8
lea eax, [esp + 0x2e4]
push 0x1c
lea ecx, [esp + 0xe4]
push eax
push ecx
call ebp
add esp, 0xc
lea ebx, [esi + 0x14]
lea edx, [esp + 0xe0]
mov ecx, ebx
push edx
mov byte [esp + 0x100], 0
call fcn.00408468
mov ecx, ebx
call sub.MFC42.DLL_CString::TrimRight
jmp 0x4078c1
mov eax, dword [esp + 0x84]
xor edx, edx
xor ecx, ecx
cmp eax, ebx
mov ebp, eax
mov byte [esp + 0x13], 0
jle 0x40759c
or edi, 0xffffffff
mov al, byte [esp + ecx + 0x270]
inc ecx
inc edi
cmp al, 0x2c
jne 0x40758d
mov al, byte [esp + 0x13]
inc al
cmp edx, ebx
mov byte [esp + 0x13], al
jne 0x407589
cmp al, 0xd
jge 0x407589
cmp ebp, edi
mov eax, ebp
jl 0x40757e
mov dl, byte [esp + eax + 0x26f]
mov byte [esp + eax + 0x270], dl
dec eax
cmp eax, edi
jge 0x40756b
mov byte [esp + ecx + 0x26f], 0x30
inc ecx
inc edi
inc ebp
xor edx, edx
jmp 0x407598
cmp byte [esp + ecx + 0x26f], 0x20
je 0x407598
inc edx
cmp ecx, ebp
jl 0x407546
mov dl, byte [esp + 0x270]
xor cl, cl
test dl, dl
lea eax, [esp + 0x270]
je 0x407930
mov dl, byte [eax]
inc eax
cmp dl, 0x2c
jne 0x4075d2
inc cl
cmp cl, 0xd
jne 0x4075c9
mov dword [esp + 0x5c], eax
jmp 0x4075d2
cmp cl, 0xe
jne 0x4075d2
mov dword [esp + 0x70], eax
cmp byte [eax], 0
jne 0x4075b4
cmp cl, 0xe
jne 0x407930
lea eax, [esp + 0x50]
lea ecx, [esp + 0x38]
push eax
lea edx, [esp + 0x44]
push ecx
lea eax, [esp + 0x44]
push edx
lea ecx, [esp + 0x60]
push eax
lea edx, [esp + 0x34]
push ecx
lea eax, [esp + 0x58]
push edx
lea ecx, [esp + 0x70]
push eax
lea edx, [esp + 0x68]
push ecx
lea eax, [esp + 0x34]
push edx
lea ecx, [esp + 0x6c]
push eax
lea edx, [esp + 0x58]
push ecx
lea eax, [esp + 0x58]
push edx
push eax
lea ecx, [esp + 0x2a4]
push str._d__I64d__d__f__d__d__d__d__d__f__d__d__d
push ecx
call dword [sym.imp.MSVCRT.dll_sscanf]
mov edi, dword [esp + 0xac]
mov edx, dword [esp + 0x98]
add esp, 0x3c
lea ecx, [esp + 0x1c]
mov byte [edi - 1], 0
push edx
call fcn.00408468
push edi
lea ecx, [esp + 0x24]
call fcn.00408468
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::TrimLeft
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::TrimRight
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::TrimLeft
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::TrimRight
push ecx
lea eax, [esp + 0x20]
mov ecx, esp
mov dword [esp + 0x64], esp
push eax
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x7c]
push ecx
call fcn.004013b0
add esp, 8
push eax
lea ecx, [esi + 0x14]
mov byte [esp + 0x67c], 9
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x78]
mov byte [esp + 0x678], 6
call fcn.0040845c
push ecx
lea edx, [esp + 0x24]
mov ecx, esp
mov dword [esp + 0x64], esp
push edx
call sub.MFC42.DLL_CString::CString
lea eax, [esp + 0x78]
push eax
call fcn.004013b0
add esp, 8
push eax
lea ecx, [esi + 0x18]
mov byte [esp + 0x67c], 0xa
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x74]
mov byte [esp + 0x678], 6
call fcn.0040845c
mov ecx, dword [esp + 0x2c]
lea edi, [esi + 0x10]
push ecx
push 0x40d0d8
push edi
call sub.MFC42.DLL_CString::Format
add esp, 0xc
mov ecx, edi
call sub.MFC42.DLL_CString::TrimLeft
mov ecx, edi
call sub.MFC42.DLL_CString::TrimRight
lea edx, [esp + 0x6c]
push 6
push edx
mov ecx, edi
call sub.MFC42.DLL_CString::Right
push eax
mov ecx, edi
mov byte [esp + 0x67c], 0xb
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x6c]
mov byte [esp + 0x678], 6
call fcn.0040845c
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x30]
push eax
push ecx
lea edx, [esi + 0x1c]
push str._I64d
push edx
call sub.MFC42.DLL_CString::Format
mov eax, dword [esp + 0x58]
lea ecx, [esi + 0x20]
push eax
push 0x40d0d8
push ecx
call sub.MFC42.DLL_CString::Format
mov eax, dword [0x40db4c]
add esp, 0x1c
cmp eax, 1
jne 0x4077a9
fld dword [esp + 0x14]
call sub.MSVCRT.dll__ftol
push eax
lea edx, [esi + 0x24]
push 0x40d0d8
push edx
call sub.MFC42.DLL_CString::Format
add esp, 0xc
jmp 0x4077f4
cmp eax, 2
jne 0x4077c3
fld dword [esp + 0x14]
sub esp, 8
lea eax, [esi + 0x24]
fstp qword [esp]
push str._.1f
push eax
jmp 0x4077ec
fld dword [esp + 0x14]
cmp eax, 3
jne 0x4077dd
sub esp, 8
lea ecx, [esi + 0x24]
fstp qword [esp]
push str._.3f
push ecx
jmp 0x4077ec
sub esp, 8
lea edx, [esi + 0x24]
fstp qword [esp]
push str._.2f
push edx
call sub.MFC42.DLL_CString::Format
add esp, 0x10
mov eax, dword [esp + 0x4c]
lea ecx, [esi + 0x30]
push eax
push 0x40d0d8
push ecx
call sub.MFC42.DLL_CString::Format
mov edx, dword [esp + 0x64]
lea eax, [esi + 0x48]
push edx
push 0x40d0d8
push eax
call sub.MFC42.DLL_CString::Format
mov ecx, dword [esp + 0x5c]
lea edx, [esi + 0x4c]
push ecx
push 0x40d0d8
push edx
call sub.MFC42.DLL_CString::Format
mov eax, dword [esp + 0x48]
lea ecx, [esi + 0x38]
push eax
push 0x40d0d8
push ecx
call sub.MFC42.DLL_CString::Format
mov edx, dword [esp + 0x84]
lea eax, [esi + 0x34]
push edx
push 0x40d0d8
push eax
call sub.MFC42.DLL_CString::Format
fld dword [esp + 0x78]
add esp, 0x34
lea ecx, [esi + 0x2c]
fstp qword [esp]
push str._.0f
push ecx
call sub.MFC42.DLL_CString::Format
mov eax, dword [esp + 0x50]
add esp, 0x10
cmp eax, ebx
je 0x407880
push str.By_Count
jmp 0x407885
push str.By_Weight
lea ecx, [esi + 0x3c]
call fcn.00408468
cmp dword [esp + 0x38], ebx
je 0x40789a
push 0x40d0e0
jmp 0x40789f
push 0x40d0dc
lea ecx, [esi + 0x44]
call fcn.00408468
cmp dword [esp + 0x50], ebx
je 0x4078b4
push 0x40d0e0
jmp 0x4078b9
push 0x40d0dc
lea ecx, [esi + 0x40]
call fcn.00408468
mov ebp, 1
mov eax, dword [edi]
mov ebx, dword [sym.imp.MSVCIRT.dll_public:_class_ostream____thiscall_ostream::operator___char_const__]
push eax
lea ecx, [esp + 0x154]
call ebx
cmp ebp, 0x10
je 0x4078eb
push 0x40d0d4
lea ecx, [esp + 0x154]
call ebx
inc ebp
add edi, 4
cmp ebp, 0x10
jle 0x4078c6
lea edx, [esp + 0x150]
push edx
call dword [sym.imp.MSVCIRT.dll_class_ostream____cdecl_endl_class_ostream__]
add esp, 4
lea ecx, [esp + 0x18]
mov byte [esp + 0x678], 5
call fcn.0040845c
mov eax, dword [esp + 0x7c]
mov ecx, dword [eax + 4]
lea edx, [eax + 4]
test byte [esp + ecx + 0x84], 1
je 0x407164
jmp 0x40794d
push ebx
push ebx
push str.error_record_format_
call sub.MFC42.DLL_AfxMessageBox
lea ecx, [esp + 0x18]
mov byte [esp + 0x678], 5
call fcn.0040845c
mov esi, dword [sym.imp.MSVCIRT.dll_public:_void___thiscall_fstream::close_void_]
lea ecx, [esp + 0x7c]
call esi
lea ecx, [esp + 0x144]
call esi
lea ecx, [esp + 0x28]
mov byte [esp + 0x678], 4
call fcn.0040845c
push fcn.0040845c
push 0x32
lea edx, [esp + 0x1b0]
push 4
push edx
mov byte [esp + 0x688], 3
call fcn.0040876a
lea ecx, [esp + 0x20]
mov byte [esp + 0x678], 2
call fcn.0040845c
lea ecx, [esp + 0x1c]
mov byte [esp + 0x678], 1
call fcn.0040845c
mov esi, dword [sym.imp.MSVCIRT.dll_public_virtual:_void___thiscall_fstream::destructor_void_]
lea ecx, [esp + 0x158]
mov byte [esp + 0x678], 0
call esi
mov edi, dword [sym.imp.MSVCIRT.dll_public_virtual:_void___thiscall_ios::destructor_void_]
lea ecx, [esp + 0x158]
call edi
lea ecx, [esp + 0x90]
mov dword [esp + 0x678], 0xffffffff
call esi
lea ecx, [esp + 0x90]
call edi
mov ecx, dword [esp + 0x670]
pop edi
mov dword fs:[0], ecx
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret