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

Disassembly:
sub esp, 0x1c
push ebx
push ebp
push esi
push 1
mov ebx, ecx
push 0x104
call dword [sym.imp.MSVCRT.dll_calloc]
mov esi, eax
add esp, 8
test esi, esi
mov dword [esp + 0x14], esi
jne 0x407674
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
push 1
call dword [sym.imp.MSVCRT.dll_exit]
mov ecx, ebx
call fcn.00407980
mov ebp, eax
test ebp, ebp
jne 0x40769e
push eax
mov dword [ebx + 0x1a9c], 7
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 4
mov eax, dword [esp + 0x2c]
push edi
mov edi, dword [sym.imp.MSVCRT.dll_fseek]
push 0
push eax
push ebp
call edi
push ebp
push 0xc
push 1
push esi
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x1c
mov ecx, ebx
push esi
call fcn.00406120
lea ecx, [esi + 4]
mov dword [esp + 0x30], eax
push ecx
mov ecx, ebx
call fcn.00406120
lea edx, [esi + 8]
mov ecx, ebx
push edx
mov dword [esp + 0x20], eax
call fcn.00406120
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x30]
push 0
push eax
push ebp
call edi
push ebp
push 0x8c
push 1
push esi
call dword [sym.imp.MSVCRT.dll_fread]
lea edi, [ebx + 0x1c20]
mov ecx, 0x23
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebx + 0x1c24]
push 0
push ecx
push ebp
call dword [sym.imp.MSVCRT.dll_fseek]
mov esi, dword [esp + 0x40]
xor edx, edx
mov dx, word [ebx + 0x1c22]
push ebp
push edx
push 1
push esi
call dword [sym.imp.MSVCRT.dll_fread]
xor ecx, ecx
lea edi, [ebx + 0x49fc]
mov cx, word [ebx + 0x1c22]
add esp, 0x38
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 eax, dword [ebx + 0x1e24]
lea esi, [ebx + 0x1e20]
xor edi, edi
cmp eax, edi
mov dword [esi], edi
je 0x407779
push eax
call sub.MFC42u.DLL_operatordelete
add esp, 4
mov dword [ebx + 0x1e24], edi
mov ecx, dword [esp + 0x30]
push edi
add ecx, 0xa4
push ecx
push ebp
call dword [sym.imp.MSVCRT.dll_fseek]
push ebp
push 4
lea edx, [esp + 0x38]
push 1
push edx
mov byte [esp + 0x40], 0
mov dword [esp + 0x41], edi
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x1c
mov eax, str.file
lea edi, [esp + 0x24]
mov dl, byte [edi]
mov cl, dl
cmp dl, byte [eax]
jne 0x4077d5
test cl, cl
je 0x4077d1
mov dl, byte [edi + 1]
mov cl, dl
cmp dl, byte [eax + 1]
jne 0x4077d5
add edi, 2
add eax, 2
test cl, cl
jne 0x4077b1
xor eax, eax
jmp 0x4077da
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4078e9
mov edi, dword [sym.imp.MSVCRT.dll_fread]
push ebp
push 4
push 1
push esi
call edi
mov eax, dword [esi]
add esp, 0x10
test eax, eax
jle 0x4078ef
push ebp
push 4
lea eax, [esp + 0x1c]
push 1
push eax
mov dword [esp + 0x24], 0
call edi
mov ecx, dword [esp + 0x24]
push 0
push ecx
push ebp
call dword [sym.imp.MSVCRT.dll_fseek]
mov edx, dword [esi]
shl edx, 2
push edx
call sub.MFC42u.DLL_operatornew
mov ecx, dword [esi]
mov edi, eax
shl ecx, 2
mov edx, ecx
xor eax, eax
shr ecx, 2
mov dword [esp + 0x50], edi
push ebp
rep stosd dword es:[edi], eax
mov ecx, edx
push 4
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esi]
mov ecx, dword [esp + 0x58]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll_fread]
mov eax, dword [esi]
lea edx, [eax + eax*4]
lea eax, [eax + edx*2]
shl eax, 2
push eax
call sub.MFC42u.DLL_operatornew
mov edi, eax
mov eax, dword [esi]
mov dword [ebx + 0x1e24], edi
add esp, 0x34
lea ecx, [eax + eax*4]
lea ecx, [eax + ecx*2]
xor eax, eax
shl ecx, 2
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esi]
xor edi, edi
test eax, eax
jle 0x4078e9
mov eax, dword [esp + 0x30]
mov dword [esp + 0x10], edi
mov dword [esp + 0x30], eax
mov ecx, dword [esp + 0x30]
push 0
mov edx, dword [ecx]
push edx
push ebp
call dword [sym.imp.MSVCRT.dll_fseek]
mov eax, dword [ebx + 0x1e24]
mov ecx, dword [esp + 0x1c]
push ebp
push 0x2c
add eax, ecx
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fread]
mov edx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x2c]
mov eax, dword [esi]
add esp, 0x1c
inc edi
add edx, 4
add ecx, 0x2c
cmp edi, eax
mov dword [esp + 0x30], edx
mov dword [esp + 0x10], ecx
jl 0x4078a1
mov edi, dword [sym.imp.MSVCRT.dll_fread]
mov ecx, dword [esp + 0x1c]
push 0
push ecx
push ebp
call dword [sym.imp.MSVCRT.dll_fseek]
mov esi, dword [esp + 0x24]
push ebp
push 0x10
push 1
push esi
call edi
mov eax, dword [ebx + 0x4cd8]
add esp, 0x1c
test eax, eax
je 0x407934
mov eax, esi
lea edx, [ebx + 0x1cac]
mov ecx, dword [eax]
mov dword [edx], ecx
mov ecx, dword [eax + 4]
mov dword [edx + 4], ecx
mov ecx, dword [eax + 8]
mov dword [edx + 8], ecx
mov eax, dword [eax + 0xc]
mov dword [edx + 0xc], eax
mov ecx, dword [esp + 0x20]
push 0
push ecx
push ebp
call dword [sym.imp.MSVCRT.dll_fseek]
push ebp
push 0xc
push 1
push esi
call edi
mov edx, dword [esi]
add ebx, 0x1cbc
push ebp
mov dword [ebx], edx
mov eax, dword [esi + 4]
mov dword [ebx + 4], eax
mov ecx, dword [esi + 8]
mov dword [ebx + 8], ecx
call dword [sym.imp.MSVCRT.dll_fclose]
push 0
call dword [sym.imp.MSVCRT.dll_free]
add esp, 0x24
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 4