Function at 0x40d570
Capabilities:
Read file on windows
Terminate process

Disassembly:
push 0xffffffffffffffff
push 0x42195b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x424
mov eax, dword [0x4389b8]
xor eax, dword [esp + 0x430]
push ebx
push ebp
push esi
push edi
mov edi, ecx
push 4
mov dword [esp + 0x434], eax
mov dword [esp + 0x1c], edi
call sub.MFC70.DLL_Ordinal_703
mov esi, eax
add esp, 4
test esi, esi
je 0x40d5cf
call sub.MFC70.DLL_Ordinal_982
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esi], eax
mov dword [esp + 0x10], esi
jmp 0x40d5d7
mov dword [esp + 0x10], 0
mov esi, dword [sym.imp.BCGCBPRO720.dll_public:_static_struct_CRuntimeClass____stdcall_CBCGPDockingControlBar::GetThisClass_void_]
call esi
mov ecx, dword [edi + 0xc]
push eax
call sub.MFC70.DLL_Ordinal_3754
test eax, eax
je 0x40d5f4
mov ecx, dword [edi + 0xc]
call fcn.0040b360
mov edx, dword [edi + 0x10]
push 0
lea eax, [esp + 0x28]
push eax
push 0x400
lea ecx, [esp + 0x38]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40d813
mov eax, dword [esp + 0x24]
test eax, eax
je 0x40d813
mov byte [esp + eax + 0x2c], 0
lea eax, [esp + 0x2c]
push 0xa
push eax
lea esi, [esp + 0x34]
call dword [sym.imp.MSVCR70.dll__mbschr]
add esp, 8
test eax, eax
mov dword [esp + 0x14], eax
jne 0x40d6a0
mov eax, esi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40d650
sub eax, edx
push eax
push esi
mov esi, dword [esp + 0x18]
mov ecx, esi
call fcn.00404600
mov eax, dword [edi + 0x28]
mov ecx, dword [0x438b7c]
mov edx, dword [edi + 0xc]
push eax
mov eax, dword [edx + 0x20]
push esi
push ecx
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
push 4
call sub.MFC70.DLL_Ordinal_703
mov esi, eax
add esp, 4
test esi, esi
jne 0x40d5b8
jmp 0x40d5cf
mov eax, dword [esp + 0x14]
lea esp, [esp]
mov edx, eax
sub edx, esi
xor ecx, ecx
test edx, edx
jle 0x40d6b5
cmp byte [eax - 1], 0xd
jne 0x40d6b5
mov ecx, 1
mov edi, eax
sub edi, ecx
sub edi, esi
call sub.MFC70.DLL_Ordinal_982
mov edx, dword [eax]
push 1
push edi
mov ecx, eax
call dword [edx]
mov ebp, eax
test ebp, ebp
je 0x40d961
add ebp, 0x10
mov ecx, edi
mov eax, ecx
mov dword [ebp - 0xc], edi
mov byte [edi + ebp], 0
shr ecx, 2
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
mov dword [esp + 0x28], ebp
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx]
mov edx, dword [eax - 0xc]
mov esi, dword [ebp - 0xc]
mov edi, ebp
sub edi, eax
mov ecx, 1
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
lea ebx, [edx + esi]
sub eax, ebx
or eax, ecx
mov dword [esp + 0x43c], 0
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], edx
jge 0x40d738
mov ecx, dword [esp + 0x10]
push ebx
call fcn.004016d0
mov edx, dword [esp + 0x20]
cmp edi, edx
mov eax, dword [esp + 0x10]
mov eax, dword [eax]
ja 0x40d749
lea ecx, [eax + edi]
mov dword [esp + 0x1c], ecx
mov edx, dword [esp + 0x20]
mov ecx, esi
mov esi, dword [esp + 0x1c]
lea edi, [eax + edx]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x10]
mov ecx, dword [esi]
mov dword [ecx - 0xc], ebx
mov edx, dword [esi]
add ebp, 0xfffffff0
mov byte [ebx + edx], 0
mov dword [esp + 0x43c], 0xffffffff
lea eax, [ebp + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40d799
mov ecx, dword [ebp]
mov edx, dword [ecx]
push ebp
call dword [edx + 4]
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 0x28]
mov edx, dword [0x438b7c]
mov eax, dword [eax + 0xc]
push ecx
mov ecx, dword [eax + 0x20]
push esi
push edx
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
mov esi, dword [esp + 0x14]
push 4
inc esi
call sub.MFC70.DLL_Ordinal_703
mov edi, eax
add esp, 4
test edi, edi
je 0x40d7e2
call sub.MFC70.DLL_Ordinal_982
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [edi], eax
mov dword [esp + 0x10], edi
jmp 0x40d7ea
mov dword [esp + 0x10], 0
push 0xa
push esi
call dword [sym.imp.MSVCR70.dll__mbschr]
add esp, 8
test eax, eax
mov dword [esp + 0x14], eax
jne 0x40d698
test esi, esi
mov edi, dword [esp + 0x18]
jne 0x40d644
jmp 0x40d659
call esi
mov ecx, dword [edi + 0xc]
push eax
call sub.MFC70.DLL_Ordinal_3754
test eax, eax
je 0x40d839
mov ecx, dword [edi + 0xc]
push 1
call fcn.0040b5c0
mov eax, dword [edi + 0xc]
mov ecx, dword [eax + 0x20]
push ecx
call dword [sym.imp.USER32.dll_HideCaret]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [edi + 0x10]
push edx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [esp + 0x10]
mov eax, dword [ebx]
mov ecx, dword [eax - 0xc]
test ecx, ecx
jle 0x40d873
mov eax, dword [edi + 0x28]
mov ecx, dword [0x438b7c]
mov edx, dword [edi + 0xc]
push eax
mov eax, dword [edx + 0x20]
push ebx
push ecx
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
jmp 0x40d896
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d88d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
push ebx
call sub.MFC70.DLL_Ordinal_705
add esp, 4
xor eax, eax
cmp esi, 0x6d
je 0x40d8a4
cmp esi, 5
je 0x40d8a4
mov eax, esi
mov ecx, dword [edi + 0x28]
mov edx, dword [0x438b78]
push ecx
push eax
mov eax, dword [edi + 0xc]
mov ecx, dword [eax + 0x20]
push edx
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
mov eax, dword [edi]
push 0x425529
push eax
call dword [sym.imp.MSVCR70.dll__mbscmp]
add esp, 8
test eax, eax
je 0x40d8f4
mov eax, dword [edi]
push ecx
sub eax, 0x10
mov dword [esp + 0x2c], esp
mov esi, esp
push eax
call fcn.004013a0
add eax, 0x10
add esp, 4
mov dword [esi], eax
call sub.WIS30.dll_int___cdecl_SetUpdateWisFile_class_ATL::CStringT_char__class_StrTraitMFC_char__class_ATL::ChTraitsCRT_char____
add esp, 4
mov eax, dword [edi + 8]
sub eax, 0x10
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40d911
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [edi]
sub eax, 0x10
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d92d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
push edi
call sub.MFC70.DLL_Ordinal_705
mov ecx, dword [esp + 0x438]
add esp, 4
pop edi
pop esi
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x428]
xor ecx, dword [esp + 0x438]
pop ebp
pop ebx
add esp, 0x430
jmp fcn.0041fbeb
jmp fcn.00401390