Function at 0x4990d0
Capabilities:
Enumerate pe sections
Map section object

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
mov ebx, dword [ebp + 0x18]
xorps xmm0, xmm0
push esi
xor esi, esi
mov dword [ebp - 0x18], 0
mov dword [ebp - 8], esi
movq qword [ebp - 0x3c], xmm0
mov dword [ebp - 0x34], esi
push edi
movups xmmword [ebp - 0x4c], xmm0
test ebx, ebx
je 0x499142
mov esi, dword [ebx]
test esi, esi
je 0x499142
mov ecx, dword [ebp + 0x1c]
mov edi, dword [ecx]
test edi, edi
jle 0x49912f
nop word [eax + eax]
mov eax, dword [esi]
test eax, eax
je 0x499125
push eax
call fcn.00596eae
add esp, 4
mov dword [esi], 0
add esi, 0x10
sub edi, 1
jne 0x499110
mov esi, dword [ebx]
test esi, esi
je 0x499142
push esi
call fcn.00596eae
add esp, 4
mov dword [ebx], 0
mov eax, dword [ebp + 0x24]
test eax, eax
je 0x49914f
mov dword [eax], 0
mov eax, dword [ebp + 0x1c]
test eax, eax
je 0x49915c
mov dword [eax], 0
call fcn.00591170
cmp dword [ebp + 8], eax
jne 0x499170
cmp dword [ebp + 0xc], 0
je 0x499297
mov ebx, dword [ebp + 0x10]
xorps xmm0, xmm0
mov esi, dword [ebp + 0x14]
or edi, 0xffffffff
push 0
push 0
push 3
push 0
push 1
push 0x1000a1
movq qword [ebx], xmm0
push esi
mov dword [ebp - 4], 0
mov dword [ebp + 8], 0
mov dword [ebx + 8], 0
call fcn.00498970
add esp, 0x1c
mov dword [ebp - 4], eax
push esi
test eax, eax
jne 0x4991cc
push str.z_CreateFile_failed__s:__m
push 0x550003
call fcn.00479a10
add esp, 0xc
jmp 0x499271
call fcn.00479340
add esp, 4
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x20]
mov dword [ebp - 0x1c], edx
push dword [ebp - 4]
push 0x8000000
push 0x20
push eax
push 0
push 0xf001f
lea eax, [ebp + 8]
push eax
call sub.ntdll.dll_NtCreateSection
push eax
call fcn.00590b90
add esp, 4
test eax, eax
je 0x49921a
push esi
push str.NtCreateSection_failed___s_:__m
push 0x550003
call fcn.00479a10
add esp, 0xc
jmp 0x499271
mov eax, dword [ebp - 0x20]
push 0x20
push 0
push 1
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0xc]
push eax
push 0
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
push dword [ebp + 8]
call sub.ntdll.dll_NtMapViewOfSection
push eax
call fcn.00590b90
add esp, 4
test eax, eax
je 0x499262
push esi
push str.NtMapViewOfSection_failed___s_:__m
push 0x550003
call fcn.00479a10
add esp, 0xc
jmp 0x499271
mov eax, dword [ebp - 0xc]
xor edi, edi
mov dword [ebx + 4], eax
mov dword [ebx + 8], 1
lea eax, [ebp + 8]
push eax
call fcn.00498940
lea eax, [ebp - 4]
push eax
call fcn.00498940
add esp, 8
test edi, edi
jne 0x499539
mov dword [ebp - 0x18], 1
jmp 0x49929a
mov ebx, dword [ebp + 0x10]
mov eax, dword [ebx + 8]
mov dword [ebp - 0x34], eax
mov eax, dword [ebx]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebx + 4]
mov dword [ebp - 0x48], eax
lea eax, [ebp - 0x38]
push eax
push 0
push 0
lea eax, [ebp - 0x40]
push eax
push ebx
call fcn.00499690
add esp, 0x14
test eax, eax
jne 0x499504
mov ecx, dword [ebp - 0x40]
movzx eax, word [ecx + 0x18]
mov edx, eax
mov word [ebp - 0x44], ax
movzx eax, word [ecx + 6]
mov dword [ebp - 0x3c], eax
movzx eax, word [ecx + 0x14]
add eax, 0x18
add eax, ecx
mov dword [ebp - 0x38], eax
mov eax, 0x10b
cmp dx, ax
jne 0x499301
cmp dword [ecx + 0x74], 0
jbe 0x499504
add ecx, 0x78
jmp 0x499322
mov eax, 0x20b
cmp dx, ax
jne 0x499504
cmp dword [ecx + 0x84], 0
jbe 0x499504
add ecx, 0x88
mov dword [ebp - 0x14], ecx
test ecx, ecx
je 0x499504
push dword [ecx]
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp + 8]
push eax
call fcn.00499560
mov edi, dword [ebp + 8]
add esp, 0xc
test edi, edi
je 0x499504
mov ebx, dword [ebp - 0x4c]
mov eax, edi
mov esi, dword [ebp - 0x48]
sub eax, ebx
cmp eax, esi
ja 0x499504
push dword [edi + 0x20]
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0xc]
push eax
call fcn.00499560
mov eax, dword [ebp - 0xc]
add esp, 0xc
test eax, eax
je 0x499504
sub eax, ebx
cmp eax, esi
ja 0x499504
push dword [edi + 0x1c]
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.00499560
mov eax, dword [ebp - 0x10]
add esp, 0xc
test eax, eax
je 0x499504
sub eax, ebx
cmp eax, esi
ja 0x499504
push dword [edi + 0x24]
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 4]
push eax
call fcn.00499560
mov ecx, dword [ebp - 4]
add esp, 0xc
test ecx, ecx
je 0x499504
mov eax, ecx
sub eax, ebx
cmp eax, esi
ja 0x499504
mov eax, dword [edi + 0x14]
test eax, eax
je 0x499504
mov ebx, dword [ebp + 0x18]
test ebx, ebx
je 0x499403
shl eax, 4
push 1
push eax
call fcn.00596ea3
mov ecx, dword [ebp - 4]
mov edx, eax
mov eax, dword [edi + 0x14]
add esp, 8
mov dword [ebp - 8], edx
jmp 0x499405
xor edx, edx
xor esi, esi
test eax, eax
je 0x4994cb
mov dword [ebp + 8], edx
cmp esi, dword [edi + 0x18]
jae 0x4994c8
movzx eax, word [ecx + esi*2]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0xc]
push dword [eax + esi*4]
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x30]
push eax
call fcn.00499560
mov ebx, dword [ebp - 0x30]
add esp, 0xc
test ebx, ebx
je 0x499504
mov eax, ebx
sub eax, dword [ebp - 0x4c]
cmp eax, dword [ebp - 0x48]
ja 0x499504
mov eax, dword [ebp + 0x20]
test eax, eax
je 0x499466
push ebx
push eax
call fcn.00476f20
add esp, 8
test eax, eax
jne 0x4994b5
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x10]
movzx eax, ax
mov ecx, dword [ecx + eax*4]
mov eax, dword [ebp - 0x14]
mov edx, dword [eax]
cmp ecx, edx
jb 0x499494
mov eax, dword [eax + 4]
add eax, edx
cmp ecx, eax
jae 0x499494
xorps xmm0, xmm0
movlpd qword [ebp - 0x28], xmm0
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x28]
jmp 0x49949c
xor eax, eax
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], eax
cmp dword [ebp + 0x20], 0
jne 0x4994f7
mov edx, dword [ebp + 8]
push ebx
push edx
mov dword [edx + 8], ecx
mov dword [edx + 0xc], eax
call fcn.004770b0
add esp, 8
add dword [ebp + 8], 0x10
inc esi
mov eax, dword [edi + 0x14]
mov ecx, dword [ebp - 4]
cmp esi, eax
jb 0x499412
mov ebx, dword [ebp + 0x18]
cmp dword [ebp + 0x20], 0
jne 0x499504
test ebx, ebx
je 0x4994f3
mov esi, dword [ebp - 8]
push 0x4995f0
push 0x10
push eax
push esi
call fcn.0059d510
mov ecx, dword [ebp + 0x1c]
add esp, 0x10
mov eax, dword [edi + 0x14]
mov dword [ecx], eax
mov dword [ebx], esi
xor ebx, ebx
jmp 0x499507
mov edx, dword [ebp + 0x24]
mov dword [edx], ecx
or ecx, eax
je 0x499504
xor ebx, ebx
jmp 0x499507
or ebx, 0xffffffff
cmp dword [ebp - 0x18], 0
je 0x49952c
mov esi, dword [ebp + 0x10]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call sub.ntdll.dll_NtUnmapViewOfSection
xorps xmm0, xmm0
movq qword [esi], xmm0
mov dword [esi + 8], 0
test ebx, ebx
jne 0x49953c
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
or ebx, 0xffffffff
cmp dword [ebp + 0x18], 0
je 0x499552
mov eax, dword [ebp - 8]
test eax, eax
je 0x499552
push eax
call fcn.00596eae
add esp, 4
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret