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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x408c1b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x324
mov al, byte [0x40d698]
push ebx
push esi
push edi
mov byte [esp + 0x13c], al
mov ecx, 0x7c
xor eax, eax
lea edi, [esp + 0x13d]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x10]
stosb byte es:[edi], al
call sub.MFC42.DLL_CString::CString
mov edi, dword [ebp + 8]
xor esi, esi
push esi
lea ecx, [esp + 0x28]
push esi
lea edx, [esp + 0xcc]
push ecx
lea eax, [esp + 0xc8]
push edx
mov ebx, 0x2710
push eax
push edi
mov dword [esp + 0x350], esi
mov dword [esp + 0x78], esi
mov dword [esp + 0x4c], esi
mov dword [esp + 0x48], ebx
mov dword [esp + 0x3c], esi
mov dword [esp + 0x40], esi
call dword [sym.imp.mapdsp60.dll_Ordinal_35_1]
lea ecx, [esp + 0x7c]
push ecx
push edi
call dword [sym.imp.mapdsp60.dll_Ordinal_33]
fld qword [esp + 0x24]
fcomp qword [0x40a788]
fnstsw ax
test ah, 0x41
je 0x405e18
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], 0x3ff00000
lea edx, [esp + 0xa4]
push edx
push esi
push esi
mov esi, dword [ebp + 0xc]
push esi
call sub.bas60.dll_Ordinal_163
movsx ax, al
push eax
call sub.bas60.dll_Ordinal_934
lea ecx, [esp + 0xec]
push 0x50
push ecx
push esi
call sub.bas60.dll_Ordinal_936
push esi
call sub.bas60.dll_Ordinal_166
test eax, eax
mov dword [esp + 0x5c], eax
je 0x405eda
push eax
call fcn.00404fb0
add esp, 4
push 0
push esi
call sub.bas60.dll_Ordinal_935
test eax, eax
mov dword [esp + 0x58], eax
je 0x405ed0
lea edx, [esp + 0x74]
mov dword [esp + 0x74], 0
push edx
push 0
push esi
call sub.bas60.dll_Ordinal_340
lea eax, [esp + 0xcc]
push eax
push esi
call sub.bas60.dll_Ordinal_174
fld qword [esp + 0xdc]
fsub qword [esp + 0x8c]
fcomp qword [0x40a780]
fnstsw ax
test ah, 0x41
je 0x405f05
fld qword [esp + 0xe4]
fsub qword [esp + 0x94]
fcomp qword [0x40a780]
fnstsw ax
test ah, 0x41
je 0x405f05
cmp word [ebp + 0x10], 1
jne 0x405f05
push 0
push esi
push edi
call dword [sym.imp.mapdsp60.dll_Ordinal_39]
lea ecx, [esp + 0x10]
mov dword [esp + 0x338], 0xffffffff
call fcn.00408280
xor eax, eax
mov ecx, dword [esp + 0x330]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [esp + 0x58]
lea ecx, [esp + 0x14]
push ecx
push esi
call sub.ODBC32.dll_SQLAllocStmt
push esi
call sub.bas60.dll_Ordinal_939
and eax, 0xff00
cmp eax, 0x1100
je 0x405f2d
push str.BEGIN_TRANSACTION
jmp 0x405f32
push 0x40d698
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::operator
push str.SELECT_count___AS_num
lea ecx, [esp + 0x14]
call fcn.00408274
push str._FROM
lea ecx, [esp + 0x14]
call fcn.00408274
lea edx, [esp + 0xec]
lea ecx, [esp + 0x10]
push edx
call fcn.00408274
push 0x40d334
lea ecx, [esp + 0x14]
call fcn.00408274
mov eax, dword [esp + 0x5c]
lea ecx, [esp + 0x10]
push eax
call fcn.00408274
lea ecx, [esp + 0xa4]
push ecx
lea ecx, [esp + 0x14]
call fcn.00408274
mov edx, dword [esp + 0x88]
mov eax, dword [esp + 0x84]
mov ecx, dword [esp + 0x98]
push edx
mov edx, dword [esp + 0x98]
push eax
mov eax, dword [esp + 0x88]
mov edi, dword [sym.imp.MSVCRT.dll_sprintf]
push ecx
mov ecx, dword [esp + 0x88]
push edx
mov edx, dword [esp + 0xa0]
push eax
mov eax, dword [esp + 0xa0]
push ecx
push edx
push eax
lea ecx, [esp + 0x15c]
push str._WHERE_exist1_AND__xmin__f_AND_xmax__f_AND_ymin__f_AND_ymax__f_
push ecx
call edi
add esp, 0x28
lea edx, [esp + 0x13c]
lea ecx, [esp + 0x10]
push edx
call fcn.00408274
cmp word [ebp + 0x10], 0
jne 0x406054
push str._AND_REGAREA__
lea ecx, [esp + 0x14]
call fcn.00408274
fld qword [0x40a778]
fdiv qword [esp + 0x24]
sub esp, 8
lea eax, [esp + 0x144]
fadd qword [0x40a770]
fstp qword [esp]
push str._.3f
push eax
call edi
add esp, 0x10
lea ecx, [esp + 0x13c]
push ecx
lea ecx, [esp + 0x14]
call fcn.00408274
mov dword [esp + 0x60], 1
push esi
call sub.bas60.dll_Ordinal_939
and eax, 0xff00
cmp eax, 0x1100
je 0x406074
push str._COMMIT_TRANSACTION
lea ecx, [esp + 0x14]
call fcn.00408274
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
push 0xfffffffffffffffd
xor esi, esi
push edx
push eax
mov dword [esp + 0x28], esi
call sub.ODBC32.dll_SQLExecDirect
cmp ax, si
jne 0x4060be
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0xb0]
push ecx
lea edx, [esp + 0x20]
push 4
push edx
push 4
push 1
push eax
mov dword [esp + 0xc8], esi
call sub.ODBC32.dll_SQLBindCol
mov ecx, dword [esp + 0x14]
push ecx
call sub.ODBC32.dll_SQLFetch
mov edx, dword [esp + 0x14]
push 1
push edx
call sub.ODBC32.dll_SQLFreeStmt
fld qword [esp + 0x94]
fsub qword [esp + 0x84]
fld qword [esp + 0x8c]
fsub qword [esp + 0x7c]
mov esi, dword [esp + 0x74]
fmulp st(1)
fld qword [esp + 0xe4]
fsub qword [esp + 0xd4]
fld qword [esp + 0xdc]
fsub qword [esp + 0xcc]
fmulp st(1)
fdivp st(1)
fst qword [esp + 0x9c]
fcomp qword [0x40a780]
fnstsw ax
test ah, 0x41
jne 0x406164
cmp esi, 0x2710
jl 0x406164
fld qword [0x40a768]
fdiv qword [esp + 0x9c]
call sub.MSVCRT.dll__ftol
mov ecx, 1
sub ecx, eax
mov eax, esi
cdq
idiv ecx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x30], eax
mov eax, 0x9c4
cmp ecx, eax
jle 0x406158
mov dword [esp + 0x1c], eax
mov ebx, dword [esp + 0x30]
mov dword [esp + 0x34], 1
mov eax, esi
cdq
idiv ebx
inc eax
mov dword [esp + 0x70], eax
lea eax, [ebx + 0xa]
shl eax, 2
push eax
call sub.MFC42.DLL_operatornew
lea ecx, [ebx*4]
mov edi, eax
mov edx, ecx
xor eax, eax
shr ecx, 2
mov dword [esp + 0x58], edi
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
lea eax, [ebx + ebx + 0xc8]
push eax
call sub.MFC42.DLL_operatornew
lea ecx, [ebx + ebx]
mov edi, eax
mov edx, ecx
xor eax, eax
shr ecx, 2
mov dword [esp + 0x6c], edi
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
lea eax, [ebx*4 + 0x190]
push eax
call sub.MFC42.DLL_operatornew
lea ecx, [ebx*4]
mov esi, eax
mov edx, ecx
xor eax, eax
mov edi, esi
mov dword [esp + 0xa8], esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
lea eax, [ebx*4 + 0x190]
push eax
call sub.MFC42.DLL_operatornew
lea ecx, [ebx*4]
mov edi, eax
mov edx, ecx
xor eax, eax
shr ecx, 2
mov dword [esp + 0x7c], edi
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
lea eax, [ebx + 0xa]
shl eax, 2
push eax
call sub.MFC42.DLL_operatornew
lea ecx, [ebx*4]
mov edi, eax
mov edx, ecx
xor eax, eax
shr ecx, 2
mov dword [esp + 0x4c], edi
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
lea eax, [ebx + 0xa]
shl eax, 3
push eax
mov dword [esp + 0x30], eax
call sub.MFC42.DLL_operatornew
mov edi, eax
lea ecx, [ebx*8]
mov dword [esp + 0x58], edi
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x30]
push eax
call sub.MFC42.DLL_operatornew
lea ecx, [ebx*8]
mov edi, eax
mov edx, ecx
xor eax, eax
shr ecx, 2
mov dword [esp + 0x64], edi
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x34]
push eax
call sub.MFC42.DLL_operatornew
lea ecx, [ebx*8]
mov edi, eax
mov edx, ecx
xor eax, eax
shr ecx, 2
mov dword [esp + 0x40], edi
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x38]
push eax
call sub.MFC42.DLL_operatornew
lea ecx, [ebx*8]
mov edi, eax
mov edx, ecx
xor eax, eax
shr ecx, 2
mov dword [esp + 0x74], edi
add esp, 0x24
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
xor edi, edi
mov dword [esp + 0x18], edi
call sub.bas60.dll_Ordinal_221
mov ecx, dword [esp + 0x70]
xor eax, eax
cmp ecx, eax
mov dword [esp + 0x68], eax
jle 0x406810
mov dword [esp + 0x4c], eax
lea eax, [ebx + 1]
mov dword [esp + 0x44], eax
call sub.Topo60.dll_Ordinal_30_2
test ax, ax
jne 0x406808
mov edi, dword [esp + 0x58]
lea ecx, [esp + 0x14]
push ecx
push edi
call sub.ODBC32.dll_SQLAllocStmt
mov edx, dword [esp + 0x14]
push 0
push 5
push edx
call sub.ODBC32.dll_SQLSetStmtOption
cmp word [esp + 0x34], 1
mov eax, ebx
jne 0x406351
mov eax, dword [esp + 0x1c]
cmp eax, ebx
jle 0x40634e
lea eax, [ebx + 0xa]
jmp 0x406351
add eax, 0xa
push eax
mov eax, dword [esp + 0x18]
push 9
push eax
call sub.ODBC32.dll_SQLSetStmtOption
push edi
call sub.bas60.dll_Ordinal_939
and eax, 0xff00
cmp eax, 0x1100
je 0x40637e
push str.BEGIN_TRANSACTION
lea ecx, [esp + 0x14]
call fcn.00408274
push str.SELECT
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::operator
push str.ID0_XMIN_XMAX_YMIN_YMAX_LCLR
lea ecx, [esp + 0x14]
call fcn.00408274
push str._FROM
lea ecx, [esp + 0x14]
call fcn.00408274
lea ecx, [esp + 0xec]
push ecx
lea ecx, [esp + 0x14]
call fcn.00408274
push 0x40d334
lea ecx, [esp + 0x14]
call fcn.00408274
mov edx, dword [esp + 0x5c]
lea ecx, [esp + 0x10]
push edx
call fcn.00408274
lea eax, [esp + 0xa4]
lea ecx, [esp + 0x10]
push eax
call fcn.00408274
mov ecx, dword [esp + 0x88]
mov edx, dword [esp + 0x84]
mov eax, dword [esp + 0x98]
push ecx
mov ecx, dword [esp + 0x98]
push edx
mov edx, dword [esp + 0x88]
mov edi, dword [sym.imp.MSVCRT.dll_sprintf]
push eax
mov eax, dword [esp + 0x88]
push ecx
mov ecx, dword [esp + 0xa0]
push edx
mov edx, dword [esp + 0xa0]
push eax
push ecx
push edx
lea eax, [esp + 0x15c]
push str._WHERE_exist1_AND__xmin__f_AND_xmax__f_AND_ymin__f_AND_ymax__f_
push eax
call edi
add esp, 0x28
lea ecx, [esp + 0x13c]
push ecx
lea ecx, [esp + 0x14]
call fcn.00408274
cmp word [ebp + 0x10], 0
jne 0x40649d
push str._AND_REGAREA__
lea ecx, [esp + 0x14]
call fcn.00408274
fld qword [0x40a778]
fdiv qword [esp + 0x24]
sub esp, 8
lea edx, [esp + 0x144]
fadd qword [0x40a770]
fstp qword [esp]
push str._.3f
push edx
call edi
add esp, 0x10
lea eax, [esp + 0x13c]
lea ecx, [esp + 0x10]
push eax
call fcn.00408274
push str._AND
lea ecx, [esp + 0x14]
call fcn.00408274
push 0x40d374
lea ecx, [esp + 0x14]
call fcn.00408274
push 0x40d370
lea ecx, [esp + 0x14]
call fcn.00408274
mov ecx, dword [esp + 0x4c]
lea edx, [esp + 0x13c]
push ecx
push 0x40d294
push edx
call edi
add esp, 0xc
lea eax, [esp + 0x13c]
lea ecx, [esp + 0x10]
push eax
call fcn.00408274
push str._AND
lea ecx, [esp + 0x14]
call fcn.00408274
push 0x40d374
lea ecx, [esp + 0x14]
call fcn.00408274
push 0x40d36c
lea ecx, [esp + 0x14]
call fcn.00408274
mov ecx, dword [esp + 0x44]
lea edx, [esp + 0x13c]
push ecx
push 0x40d294
push edx
call edi
add esp, 0xc
lea eax, [esp + 0x13c]
lea ecx, [esp + 0x10]
push eax
call fcn.00408274
mov ecx, dword [esp + 0x58]
push ecx
call sub.bas60.dll_Ordinal_939
and eax, 0xff00
cmp eax, 0x1100
je 0x406565
push 0x40d274
lea ecx, [esp + 0x14]
call fcn.00408274
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
push 0xfffffffffffffffd
push edx
push eax
call sub.ODBC32.dll_SQLExecDirect
test ax, ax
je 0x406585
cmp ax, 1
jne 0x4067df
mov edi, dword [esp + 0x54]
lea ecx, [ebx*4]
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push esi
and ecx, 3
push 4
rep stosb byte es:[edi], al
mov edi, dword [esp + 0x5c]
mov eax, dword [esp + 0x1c]
push edi
push 4
push 1
push eax
call sub.ODBC32.dll_SQLBindCol
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x14]
push esi
push 8
push ecx
push 8
push 2
push edx
call sub.ODBC32.dll_SQLBindCol
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x14]
push esi
push 8
push eax
push 8
push 3
push ecx
call sub.ODBC32.dll_SQLBindCol
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 0x14]
push esi
push 8
push edx
push 8
push 4
push eax
call sub.ODBC32.dll_SQLBindCol
mov ecx, dword [esp + 0x50]
mov edx, dword [esp + 0x14]
push esi
push 8
push ecx
push 8
push 5
push edx
call sub.ODBC32.dll_SQLBindCol
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x14]
push esi
push 4
push eax
push 4
push 6
push ecx
call sub.ODBC32.dll_SQLBindCol
mov edx, dword [esp + 0x64]
mov eax, dword [esp + 0x6c]
mov ecx, dword [esp + 0x14]
push edx
push eax
push 1
push 1
push ecx
call sub.ODBC32.dll_SQLExtendedFetch
test ax, ax
je 0x406658
cmp ax, 1
je 0x406658
mov edx, dword [esp + 0x14]
push 1
push edx
call sub.ODBC32.dll_SQLFreeStmt
jmp 0x4067df
mov eax, dword [esp + 0x14]
push 1
push eax
call sub.ODBC32.dll_SQLFreeStmt
test ebx, ebx
jle 0x4067d3
mov eax, dword [esp + 0x38]
mov esi, dword [esp + 0x20]
mov ebx, dword [esp + 0x40]
sub eax, edi
mov dword [esp + 0x2c], edi
mov edi, dword [esp + 0x48]
mov dword [esp + 0xac], eax
mov eax, dword [esp + 0x50]
mov edx, esi
mov ecx, esi
sub eax, esi
sub edi, edx
sub ebx, ecx
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x78], ecx
mov edx, dword [esp + 0x2c]
cmp dword [edx], 0
jbe 0x4067ab
mov ecx, dword [esp + 0x18]
mov edx, dword [eax + esi]
inc ecx
mov dword [esp + 0x18], ecx
mov ecx, dword [eax + esi + 4]
mov eax, dword [esi + 4]
push ecx
mov ecx, dword [esi]
push edx
mov edx, dword [edi + esi + 4]
push eax
mov eax, dword [edi + esi]
push ecx
mov ecx, dword [ebx + esi + 4]
push edx
mov edx, dword [ebx + esi]
push eax
mov eax, dword [ebp + 8]
push ecx
push edx
push eax
call fcn.00405010
fcomp qword [0x40a760]
add esp, 0x24
fnstsw ax
test ah, 0x41
jne 0x406718
cmp word [esp + 0x34], 1
je 0x406718
mov ecx, dword [esp + 0x2c]
mov eax, dword [ebp + 0xc]
push 0
mov edx, dword [ecx]
mov ecx, dword [ebp + 8]
push edx
push eax
push ecx
call dword [sym.imp.mapdsp60.dll_short_int___stdcall__DispLin_class_KernelDriver___short_int__long_int__long_int_]
jmp 0x4067a7
fld qword [ebx + esi]
fsub qword [esp + 0xbc]
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0xac]
fmul qword [esp + 0x24]
fstp qword [ebx + esi]
fld qword [edi + esi]
fsub qword [esp + 0xc4]
fmul qword [esp + 0x24]
fstp qword [edi + esi]
fld qword [esi]
fsub qword [esp + 0xbc]
fmul qword [esp + 0x24]
fstp qword [esi]
fld qword [eax + esi]
fsub qword [esp + 0xc4]
fmul qword [esp + 0x24]
fst qword [esp + 0xb4]
fstp qword [eax + esi]
mov eax, dword [esp + 0x2c]
mov ecx, dword [edx + eax]
mov edx, dword [esp + 0xb8]
mov eax, dword [esp + 0xb4]
push ecx
mov ecx, dword [esi + 4]
push edx
mov edx, dword [esi]
push eax
mov eax, dword [edi + esi + 4]
push ecx
mov ecx, dword [edi + esi]
push edx
mov edx, dword [ebx + esi + 4]
push eax
mov eax, dword [ebx + esi]
push ecx
mov ecx, dword [ebp + 8]
push edx
push eax
push ecx
call dword [sym.imp.mapdsp60.dll_void___stdcall__Line_class_KernelDriver___double__double__double__double__long_int_]
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x2c]
add esi, 8
add ecx, 4
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x78]
dec ecx
mov dword [esp + 0x78], ecx
jne 0x4066a3
mov esi, dword [esp + 0x9c]
mov ebx, dword [esp + 0x30]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
cmp edx, eax
jge 0x406808
mov eax, dword [esp + 0x68]
mov edi, dword [esp + 0x4c]
mov edx, dword [esp + 0x44]
mov ecx, dword [esp + 0x70]
inc eax
add edi, ebx
add edx, ebx
cmp eax, ecx
mov dword [esp + 0x68], eax
mov dword [esp + 0x4c], edi
mov dword [esp + 0x44], edx
jl 0x40630c
mov edi, dword [esp + 0x18]
test edi, edi
jg 0x406828
cmp word [esp + 0x60], 1
jne 0x406828
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push 0
push eax
push ecx
call dword [sym.imp.mapdsp60.dll_Ordinal_39]
call sub.bas60.dll_Ordinal_222
mov edx, dword [esp + 0x54]
push edx
call sub.MFC42.DLL_operatordelete
push esi
call sub.MFC42.DLL_operatordelete
mov eax, dword [esp + 0x6c]
push eax
call sub.MFC42.DLL_operatordelete
mov ecx, dword [esp + 0x78]
push ecx
call sub.MFC42.DLL_operatordelete
mov edx, dword [esp + 0x48]
push edx
call sub.MFC42.DLL_operatordelete
mov eax, dword [esp + 0x54]
push eax
call sub.MFC42.DLL_operatordelete
mov ecx, dword [esp + 0x60]
push ecx
call sub.MFC42.DLL_operatordelete
mov edx, dword [esp + 0x3c]
push edx
call sub.MFC42.DLL_operatordelete
mov eax, dword [esp + 0x70]
push eax
call sub.MFC42.DLL_operatordelete
add esp, 0x24
lea ecx, [esp + 0x10]
mov dword [esp + 0x338], 0xffffffff
call fcn.00408280
mov ecx, dword [esp + 0x330]
mov eax, edi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret