Function at 0x418840
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x120
mov al, byte [0x451020]
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov byte [esp + 0x2c], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x2d]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov dword [esp + 0x1c], esi
stosb byte es:[edi], al
call sub.MFC42.DLL_AfxGetModuleState
mov eax, dword [eax + 8]
push str.fixleak.log
lea ecx, [esp + 0x30]
push 0x104
push ecx
push eax
call fcn.00403dc0
lea edx, [esp + 0x30]
lea eax, [esp + 0x3c]
push edx
push eax
call fcn.00404c40
add esp, 0x18
test eax, eax
je 0x418b61
mov eax, dword [esp + 0x20]
mov ecx, dword [esi + 0x24]
cmp ecx, eax
je 0x418b68
lea ecx, [esp + 0x2c]
push 0x45071c
push ecx
mov dword [esi + 0x24], eax
mov dword [esp + 0x1c], 0
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebx, eax
add esp, 8
test ebx, ebx
mov dword [esp + 0x24], ebx
je 0x418b68
mov ebp, 4
push ebx
push ebp
lea edx, [esp + 0x1c]
push 1
push edx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, ebp
je 0x41890b
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x120
ret
cmp dword [esp + 0x14], 1
je 0x418927
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x120
ret
mov ecx, esi
call fcn.00418bc0
push 0x144
call sub.MFC42.DLL_operatornew
mov edx, eax
add esp, 4
test edx, edx
je 0x41897f
mov ecx, 8
xor eax, eax
lea edi, [edx + 0x120]
mov dword [edx + 0x140], 0xffffffff
rep stosd dword es:[edi], eax
mov ecx, 0x20
lea edi, [edx + 0x80]
rep stosd dword es:[edi], eax
mov ecx, 8
lea edi, [edx + 0x100]
rep stosd dword es:[edi], eax
mov ecx, 0x20
mov edi, edx
rep stosd dword es:[edi], eax
jmp 0x418981
xor edx, edx
push ebx
push 0x144
push 1
push edx
mov dword [esp + 0x20], edx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 0x144
jne 0x418b42
mov eax, dword [esp + 0x10]
mov byte [eax + 0x11f], 0
mov ecx, dword [esp + 0x10]
mov byte [ecx + 0xff], 0
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x1c]
mov byte [edx + 0x13f], 0
mov eax, dword [esp + 0x10]
lea esi, [ecx + 0x14]
mov byte [eax + 0x7f], 0
mov eax, dword [esi + 8]
mov edx, dword [esi + 0xc]
sub edx, eax
mov edi, eax
sar edx, 2
cmp edx, 1
jae 0x418aad
mov edx, dword [esi + 4]
test edx, edx
je 0x4189fb
mov ecx, eax
sub ecx, edx
sar ecx, 2
cmp ecx, 1
ja 0x418a00
mov ecx, 1
test edx, edx
jne 0x418a08
xor eax, eax
jmp 0x418a0d
sub eax, edx
sar eax, 2
add eax, ecx
test eax, eax
mov dword [esp + 0x18], eax
jge 0x418a19
xor eax, eax
shl eax, 2
push eax
call sub.MFC42.DLL_operatornew
mov ebp, dword [esi + 4]
add esp, 4
cmp ebp, edi
mov dword [esp + 0x28], eax
mov ebx, eax
je 0x418a46
push ebp
push ebx
call fcn.00418d10
add ebp, 4
add esp, 8
add ebx, 4
cmp ebp, edi
jne 0x418a32
lea ecx, [esp + 0x10]
push ecx
push 1
push ebx
mov ecx, esi
call fcn.00418ce0
mov edx, dword [esi + 8]
add ebx, 4
push ebx
push edx
push edi
mov ecx, esi
call fcn.00418cb0
mov eax, dword [esi + 8]
mov ecx, dword [esi + 4]
push eax
push ecx
mov ecx, esi
call fcn.00420da0
mov edx, dword [esi + 4]
push edx
call sub.MFC42.DLL_operatordelete
mov edi, dword [esp + 0x2c]
mov eax, dword [esp + 0x1c]
add esp, 4
lea ecx, [edi + eax*4]
mov dword [esi + 0xc], ecx
mov ecx, esi
call fcn.00418c90
mov ebx, dword [esp + 0x24]
lea edx, [edi + eax*4 + 4]
mov dword [esi + 8], edx
mov dword [esi + 4], edi
mov ebp, 4
jmp 0x41892e
mov ecx, eax
sub ecx, edi
sar ecx, 2
cmp ecx, 1
jae 0x418b00
lea ecx, [edi + 4]
push ecx
push eax
push edi
mov ecx, esi
call fcn.00418cb0
mov eax, dword [esi + 8]
lea edx, [esp + 0x10]
mov ecx, eax
push edx
sub ecx, edi
mov edx, 1
sar ecx, 2
sub edx, ecx
mov ecx, esi
push edx
push eax
call fcn.00418ce0
mov eax, dword [esi + 8]
cmp edi, eax
je 0x418af8
mov ecx, dword [esp + 0x10]
mov dword [edi], ecx
add edi, ebp
cmp edi, eax
jne 0x418aec
add dword [esi + 8], ebp
jmp 0x41892e
lea ecx, [eax - 4]
push eax
push eax
mov dword [esp + 0x20], ecx
push ecx
mov ecx, esi
call fcn.00418cb0
mov ecx, dword [esi + 8]
lea eax, [ecx - 4]
cmp edi, eax
je 0x418b27
sub eax, ebp
sub ecx, ebp
cmp eax, edi
mov edx, dword [eax]
mov dword [ecx], edx
jne 0x418b1b
lea eax, [edi + 4]
cmp edi, eax
je 0x418b3a
mov ecx, dword [esp + 0x10]
mov dword [edi], ecx
add edi, ebp
cmp edi, eax
jne 0x418b2e
add dword [esi + 8], ebp
jmp 0x41892e
mov edx, dword [esp + 0x10]
push edx
call sub.MFC42.DLL_operatordelete
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x120
ret
mov ecx, esi
call fcn.00418bc0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x120
ret