Function at 0x407040
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4b14a2
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x190
push esi
push edi
lea eax, [esp + 0x94]
xor edi, edi
push 0x104
push eax
push edi
mov dword [esp + 0x18], edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0x94]
push 0x5c
push ecx
call dword [sym.imp.MSVCRT.dll__mbsrchr]
add esp, 8
cmp eax, edi
je 0x407091
mov byte [eax], 0
lea edx, [esp + 0x94]
lea ecx, [esp + 0x1c]
push edx
call sub.MFC42.DLL_CString::CString_4
push str.pid.txt
push eax
lea eax, [esp + 0x20]
mov dword [esp + 0x1a8], edi
push eax
call sub.MFC42.DLL_operator_3
lea ecx, [esp + 0x1c]
mov byte [esp + 0x1a0], 2
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x18]
push edi
push 0x80
push 3
push edi
push 3
push bind
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push str.03_07
lea ecx, [esp + 0x18]
mov esi, eax
call sub.MFC42.DLL_CString::CString_4
cmp esi, 0xffffffff
mov byte [esp + 0x1a0], 3
je 0x407152
lea edx, [esp + 0x10]
push edi
push edx
lea eax, [esp + 0x10]
push 2
push eax
push esi
mov byte [esp + 0x1e], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40714b
cmp dword [esp + 0x10], 2
jne 0x40714b
lea ecx, [esp + 8]
push 0x57031c
push ecx
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
test eax, eax
jne 0x40714b
push str.07_03
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::operator
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
push 0x44
call sub.MFC42.DLL_operatornew
mov ebx, eax
add esp, 4
mov dword [esp + 0x24], ebx
cmp ebx, edi
mov byte [esp + 0x1a4], 4
je 0x407212
lea edx, [esp + 0xc]
push ebp
push edx
mov dword [esp + 0x18], 1
call fcn.00450570
add esp, 4
mov esi, eax
mov edi, dword [esp + 0x1c]
lea eax, [esp + 0x18]
push eax
mov ecx, 0x575ec8
mov byte [esp + 0x1ac], 5
call fcn.0044df80
mov ebp, eax
mov dword [esp + 0x14], 3
mov ecx, dword [esp + 0x1b4]
mov dword [esp + 0x1a8], 6
push ecx
mov ecx, esi
call fcn.0044c8e0
push eax
mov eax, dword [esp + 0x1b8]
test eax, eax
sete dl
push edx
push 0xffffffffffffffff
push 0
push 0
push 0
push 1
push 2
push 0x7d5
lea ecx, [esp + 0x68]
call fcn.00450330
push eax
push 0
push 0x570310
push edi
push 0x570304
mov ecx, ebp
call fcn.0044c8e0
push eax
mov ecx, ebx
call fcn.00463210
pop ebp
jmp 0x407214
xor eax, eax
mov ebx, dword [esp + 0x10]
mov dword [0x58f594], eax
test bl, 2
mov dword [esp + 0x1a4], 7
je 0x40723d
and ebx, 0xfffffffd
lea ecx, [esp + 0x14]
mov dword [esp + 0x10], ebx
call fcn.0044d0c0
test bl, 1
mov dword [esp + 0x1a4], 3
pop ebx
je 0x407257
lea ecx, [esp + 8]
call fcn.0044d0c0
push 0x1a4
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [esp + 0x20], eax
test eax, eax
mov byte [esp + 0x1a0], 9
je 0x407290
push 0x7f
push str.Jul_20_2006
push 0x80
push 0x570214
mov ecx, eax
call fcn.004655c0
mov esi, eax
jmp 0x407292
xor esi, esi
mov ecx, dword [0x58f594]
push esi
mov byte [esp + 0x1a4], 3
call fcn.00463480
lea eax, [esp + 0x3c]
mov edi, 0xe
push eax
mov ecx, esi
mov dword [esp + 0x40], 0x5702e8
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], 0x5702d8
mov dword [esp + 0x4c], edi
call fcn.00465670
lea ecx, [esp + 0x24]
mov dword [esp + 0x24], 0x5702c8
push ecx
mov ecx, esi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], 0x5702b8
mov dword [esp + 0x34], 0xf
mov dword [esp + 0x38], 0x570294
call fcn.00465650
mov ecx, dword [0x58f594]
push 1
call fcn.00463a90
lea ecx, [esp + 0x50]
call fcn.0044f800
mov ecx, dword [0x58f594]
lea edx, [esp + 0x50]
push edx
mov byte [esp + 0x1a4], 0xa
call fcn.004634e0
lea ecx, [esp + 0x50]
call fcn.00450fe0
pop edi
pop esi
test eax, eax
je 0x40734f
push 0
push 0x30
lea ecx, [esp + 0x50]
call fcn.004500d0
push eax
call sub.MFC42.DLL_AfxMessageBox
lea ecx, [esp + 0x48]
mov byte [esp + 0x198], 3
call fcn.0044fa10
lea ecx, [esp + 0xc]
mov byte [esp + 0x198], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
mov dword [esp + 0x198], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x190]
mov dword fs:[0], ecx
add esp, 0x19c
ret