Function at 0x406650
Capabilities:
Enumerate pe sections
Get file size
Read file via mapping

Disassembly:
push 0xffffffffffffffff
push 0x43c55c
mov eax, dword fs:[0]
push eax
sub esp, 0x11c
mov eax, dword [0x4516a0]
xor eax, esp
mov dword [esp + 0x118], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4516a0]
xor eax, esp
push eax
lea eax, [esp + 0x130]
mov dword fs:[0], eax
mov eax, dword [esp + 0x140]
push 0x103
mov esi, edx
lea edx, [esp + 0x2d]
push 0
push edx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], ecx
mov byte [esp + 0x34], 0
call fcn.00429e90
add esp, 0xc
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push 0x104
lea ecx, [esp + 0x2c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [esp + 0x28]
push edx
lea ecx, [esp + 0x18]
call fcn.00401bb0
mov dword [esp + 0x138], 0
mov edx, dword [esp + 0x14]
mov ecx, dword [edx - 8]
mov eax, 1
sub eax, dword [edx - 4]
or ecx, eax
jge 0x406709
push 0
lea ecx, [esp + 0x18]
call fcn.00401ed0
mov edx, dword [esp + 0x14]
push 0
push 0
push 3
push 0
push 1
push SysReAllocString
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
or ebp, 0xffffffff
cmp ebx, ebp
jne 0x4067a1
push 0x444154
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x20]
push ecx
call fcn.00401730
add esp, 0xc
push eax
mov ecx, esi
mov byte [esp + 0x13c], 1
call fcn.004065b0
mov byte [esp + 0x138], 0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
mov ecx, ebp
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x406776
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x138], ebp
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
lock xadd dword [ecx], ebp
dec ebp
test ebp, ebp
jg 0x40679a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
jmp 0x40695c
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0
push 0
push 0
push 2
push 0
push ebx
mov dword [esp + 0x34], eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov edi, eax
mov dword [esp + 0x18], edi
test edi, edi
jne 0x406823
push 0x444154
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x20]
push edx
call fcn.00401730
add esp, 0xc
push eax
mov ecx, esi
mov byte [esp + 0x13c], 2
call fcn.004065b0
mov byte [esp + 0x138], 0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov edx, ebp
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406817
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x406776
push 0
push 0
push 0
push 4
push edi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ebp, eax
test ebp, ebp
jne 0x4068b7
push 0x444154
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x20]
push edx
call fcn.00401730
add esp, 0xc
push eax
mov ecx, esi
mov byte [esp + 0x13c], 3
call fcn.004065b0
mov byte [esp + 0x138], 0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406887
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push edi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push ebx
call esi
mov dword [esp + 0x138], 0xffffffff
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x40678e
mov eax, dword [ebp + 0x3c]
movzx ecx, word [eax + ebp + 6]
add eax, ebp
lea ecx, [ecx + ecx*4]
mov edi, dword [eax + ecx*8 + 0xe4]
add edi, dword [eax + ecx*8 + 0xe0]
lea eax, [eax + ecx*8 + 0xd0]
mov eax, dword [esp + 0x1c]
add edi, ebp
mov esi, ebp
sub esi, edi
mov edx, edi
sub edx, ebp
add esi, eax
cmp edx, eax
jne 0x4068fb
push ebp
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [esp + 0x18]
push eax
jmp 0x406888
mov ecx, dword [esp + 0x24]
push esi
mov dword [ecx], esi
call fcn.0040b115
mov edx, dword [esp + 0x24]
push esi
push edi
push eax
mov dword [edx], eax
call fcn.0042d520
add esp, 0x10
push ebp
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [esp + 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
push ebx
call esi
mov dword [esp + 0x138], 0xffffffff
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40695a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, 1
mov ecx, dword [esp + 0x130]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x118]
xor ecx, esp
call fcn.004273bb
add esp, 0x128
ret 4