Function at 0x403240
Capabilities:
Enumerate pe sections
Read file on windows

Disassembly:
sub esp, 0x144
push ebx
push ebp
push esi
mov esi, ecx
mov ecx, dword [esp + 0x154]
xor eax, eax
xor edx, edx
push edi
mov ax, word [ecx + 6]
mov dx, word [ecx + 4]
imul eax, edx
xor ebx, ebx
push 0x8000
mov dword [esp + 0x28], esi
xor ebp, ebp
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], eax
call sub.MFC42.DLL_operatornew
mov edi, eax
add esp, 4
cmp edi, ebx
mov dword [esp + 0x1c], edi
je 0x40374c
mov ecx, 0x2000
xor eax, eax
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x40]
push eax
call sub.MFC42.DLL_operatornew
mov ecx, dword [esp + 0x15c]
add esp, 4
test eax, eax
mov dword [esp + 0x34], eax
mov dword [ecx + 0x1c], eax
jne 0x4032d9
mov edx, dword [esp + 0x1c]
push edx
call sub.MFC42.DLL_operatordelete
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x144
ret 4
mov eax, dword [esi]
lea ecx, [esp + 0x20]
push eax
push 1
push 1
push ecx
call dword [sym.imp.MSVCRT.dll_fread]
mov ecx, dword [esp + 0x30]
mov eax, 1
and ecx, 0xff
mov edx, dword [esp + 0x2c]
shl eax, cl
add esp, 0x10
lea edi, [ecx + 1]
mov dword [esp + 0x14], edi
mov dword [esp + 0x48], edi
push eax
push edx
lea ecx, [eax + 2]
mov dword [esp + 0x4c], eax
mov dword [esp + 0x30], ecx
mov ecx, esi
call fcn.00403150
test eax, eax
je 0x403705
jmp 0x403330
mov edi, dword [esp + 0x14]
cmp ebp, 4
jg 0x4033db
mov eax, dword [esp + 0x3c]
test eax, eax
jne 0x4033bd
xor eax, eax
test ebp, ebp
jle 0x40335d
mov edx, dword [esp + 0x18]
lea ecx, [esp + eax + 0x4c]
inc eax
mov dl, byte [ecx + edx]
cmp eax, ebp
mov byte [ecx], dl
jl 0x403347
mov esi, dword [esp + 0x24]
mov eax, dword [esi]
lea ecx, [esp + 0x20]
push eax
push 1
push 1
push ecx
mov dword [esp + 0x28], 0
call dword [sym.imp.MSVCRT.dll_fread]
mov eax, dword [esp + 0x30]
add esp, 0x10
test al, al
je 0x4033a9
mov edx, dword [esi]
and eax, 0xff
push edx
push eax
lea eax, [esp + ebp + 0x54]
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fread]
mov ecx, dword [esp + 0x30]
add esp, 0x10
and ecx, 0xff
add ebp, ecx
jmp 0x4033b1
mov dword [esp + 0x3c], 1
mov edx, dword [esi]
test byte [edx + 0xc], 0x10
jne 0x403705
cmp ebp, 4
jg 0x4033db
test ebp, ebp
jle 0x4036c3
lea eax, [ebp*8]
sub eax, ebx
cmp edi, eax
ja 0x4036c3
mov edx, 0x20
sub edx, edi
mov edi, dword [esp + 0x18]
mov ecx, edx
mov eax, dword [esp + edi + 0x4c]
sub ecx, ebx
shl eax, cl
mov ecx, edx
mov edx, dword [esp + 0x44]
shr eax, cl
add ebx, dword [esp + 0x14]
mov ecx, ebx
and ebx, 7
shr ecx, 3
add edi, ecx
sub ebp, ecx
lea ecx, [edx + 1]
mov dword [esp + 0x18], edi
cmp eax, ecx
jae 0x403705
cmp eax, edx
je 0x40332c
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x10]
inc edi
mov dword [esp + 0x2c], eax
mov edx, dword [ecx + eax*8 + 4]
mov dword [esp + 0x10], edi
mov cl, byte [edx]
mov edx, dword [esp + 0x34]
mov byte [edx + edi - 1], cl
jmp 0x403444
mov esi, dword [esp + 0x24]
cmp ebp, 4
jg 0x4034f3
mov eax, dword [esp + 0x3c]
test eax, eax
jne 0x4034cf
xor eax, eax
test ebp, ebp
jle 0x403471
mov edx, dword [esp + 0x18]
lea ecx, [esp + eax + 0x4c]
inc eax
mov dl, byte [ecx + edx]
cmp eax, ebp
mov byte [ecx], dl
jl 0x40345b
mov esi, dword [esp + 0x24]
mov eax, dword [esi]
mov edi, dword [sym.imp.MSVCRT.dll_fread]
push eax
push 1
lea ecx, [esp + 0x28]
push 1
push ecx
mov dword [esp + 0x28], 0
call edi
mov eax, dword [esp + 0x30]
add esp, 0x10
test al, al
je 0x4034bb
mov edx, dword [esi]
and eax, 0xff
push edx
push eax
lea eax, [esp + ebp + 0x54]
push 1
push eax
call edi
mov ecx, dword [esp + 0x30]
add esp, 0x10
and ecx, 0xff
add ebp, ecx
jmp 0x4034c3
mov dword [esp + 0x3c], 1
mov edx, dword [esi]
test byte [edx + 0xc], 0x10
jne 0x403705
cmp ebp, 4
jg 0x4034f3
test ebp, ebp
jle 0x4036c3
mov edx, dword [esp + 0x14]
lea eax, [ebp*8]
sub eax, ebx
cmp edx, eax
ja 0x4036c3
jmp 0x4034f7
mov edx, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
mov eax, 0x20
sub eax, edx
mov edi, dword [esp + 0x18]
mov esi, dword [esp + esi + 0x4c]
mov ecx, eax
sub ecx, ebx
add ebx, edx
shl esi, cl
mov ecx, eax
mov eax, ebx
shr eax, 3
add edi, eax
sub ebp, eax
shr esi, cl
mov dword [esp + 0x18], edi
mov edi, dword [esp + 0x44]
and ebx, 7
mov dword [esp + 0x30], ebx
cmp esi, edi
je 0x403666
lea eax, [edi + 1]
cmp esi, eax
je 0x4036c3
mov edx, dword [esp + 0x1c]
mov eax, dword [edx + esi*8 + 4]
mov ecx, dword [edx + esi*8]
test eax, eax
je 0x4035b7
mov dl, byte [eax]
mov edi, dword [esp + 0x40]
mov byte [esp + 0x38], dl
mov edx, dword [esp + 0x10]
add edx, ecx
cmp edx, edi
ja 0x403705
test ecx, ecx
jle 0x403586
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 0x34]
mov dl, byte [eax]
mov byte [ebx + edi], dl
inc edi
inc eax
dec ecx
mov dword [esp + 0x10], edi
jne 0x40356c
mov ebx, dword [esp + 0x30]
mov edi, dword [esp + 0x28]
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x2c]
mov eax, edi
push ecx
mov ecx, dword [esp + 0x28]
push edx
push eax
mov eax, dword [esp + 0x28]
inc edi
push eax
mov dword [esp + 0x38], edi
call fcn.004031c0
test eax, eax
je 0x403705
jmp 0x40363a
mov ecx, dword [esp + 0x2c]
mov edi, dword [esp + 0x40]
mov eax, dword [edx + ecx*8 + 4]
mov ecx, dword [edx + ecx*8]
mov dl, byte [eax]
mov byte [esp + 0x38], dl
mov edx, dword [esp + 0x10]
lea edx, [ecx + edx + 1]
cmp edx, edi
ja 0x403705
test ecx, ecx
jle 0x4035fa
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 0x34]
mov dl, byte [eax]
mov byte [ebx + edi], dl
inc edi
inc eax
dec ecx
mov dword [esp + 0x10], edi
jne 0x4035e0
mov ebx, dword [esp + 0x30]
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x34]
mov cl, byte [esp + 0x38]
mov edi, dword [esp + 0x28]
mov byte [edx + eax], cl
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x2c]
inc eax
mov dword [esp + 0x10], eax
mov eax, edi
push ecx
mov ecx, dword [esp + 0x28]
push edx
push eax
mov eax, dword [esp + 0x28]
inc edi
push eax
mov dword [esp + 0x38], edi
call fcn.004031c0
test eax, eax
je 0x403705
mov ecx, dword [esp + 0x14]
mov edx, 1
shl edx, cl
mov dword [esp + 0x2c], esi
cmp edi, edx
jne 0x403440
mov eax, ecx
cmp eax, 0xc
je 0x403440
inc eax
mov dword [esp + 0x14], eax
jmp 0x403440
mov eax, dword [esp + 0x48]
cmp edi, 0x1000
mov dword [esp + 0x14], eax
jge 0x4036b3
mov ecx, dword [esp + 0x1c]
mov eax, 0x1000
sub eax, edi
lea esi, [ecx + edi*8 + 4]
mov dword [esp + 0x30], eax
mov eax, dword [esi]
test eax, eax
je 0x4036a5
push eax
call sub.MFC42.DLL_operatordelete
mov dword [esi], 0
add esp, 4
mov dword [esi - 4], 0
mov eax, dword [esp + 0x30]
add esi, 8
dec eax
mov dword [esp + 0x30], eax
jne 0x403689
mov esi, dword [esp + 0x24]
lea eax, [edi + 2]
mov dword [esp + 0x28], eax
jmp 0x40332c
mov ebx, dword [esp + 0x1c]
mov edi, 0x1000
lea esi, [ebx + 4]
mov eax, dword [esi]
test eax, eax
je 0x4036e4
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
mov dword [esi], 0
add esi, 8
dec edi
jne 0x4036cf
push ebx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x144
ret 4
mov ebx, dword [esp + 0x1c]
mov edi, 0x1000
lea esi, [ebx + 4]
mov eax, dword [esi]
test eax, eax
je 0x403726
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
mov dword [esi], 0
add esi, 8
dec edi
jne 0x403711
push ebx
call sub.MFC42.DLL_operatordelete
mov esi, dword [esp + 0x15c]
mov edx, dword [esi + 0x1c]
push edx
call sub.MFC42.DLL_operatordelete
add esp, 8
mov dword [esi + 0x1c], 0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x144
ret 4