Function at 0x5032b0
Capabilities:
Allocate or change rwx memory
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56390a
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
push esi
push edi
lea edi, [ebp - 0x68]
mov ecx, 0x17
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov eax, dword [0x634928]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ecx, 0x65a593
call fcn.0053954a
mov esi, esp
mov eax, dword [0x5d6484]
push eax
push 0
push 4
call dword [sym.imp.KERNEL32.dll_OpenFileMappingW]
cmp esi, esp
call fcn.0053951b
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x503372
mov esi, esp
push 0
push 0
push 0
push 4
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
cmp esi, esp
call fcn.0053951b
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x50335f
push 0x10
mov edx, dword [ebp - 0x18]
push edx
push 0x642c18
call fcn.0053cf40
add esp, 0xc
mov esi, esp
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp esi, esp
call fcn.0053951b
mov esi, esp
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, esp
call fcn.0053951b
cmp dword [0x642be0], 0
jne 0x503419
mov dword [0x642be4], 0x4000
mov esi, esp
push 0x40
push 0x1000
mov edx, dword [0x642be4]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
cmp esi, esp
call fcn.0053951b
mov dword [0x642be0], eax
cmp dword [0x642be0], 0
jne 0x5033c9
push 0
push 1
call fcn.00503820
add esp, 8
xor al, al
jmp 0x503788
push 0
call fcn.005038f0
add esp, 4
push eax
call fcn.0053f8af
add esp, 4
mov dword [ebp - 0x1c], 0
jmp 0x5033ee
mov eax, dword [ebp - 0x1c]
add eax, 1
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x1c]
cmp ecx, dword [0x642be4]
jge 0x503419
call fcn.0053f88e
and eax, 0x800000ff
jns 0x50340c
dec eax
or eax, 0xffffff00
inc eax
mov edx, dword [0x642be0]
add edx, dword [ebp - 0x1c]
mov byte [edx], al
jmp 0x5033e5
mov esi, esp
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
cmp esi, esp
call fcn.0053951b
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x24], eax
cmp dword [ebp + 0xc], 0
jne 0x50344c
push 0
push 2
call fcn.00503820
add esp, 8
xor al, al
jmp 0x503788
movzx ecx, byte [ebp + 0x10]
test ecx, ecx
je 0x503460
push 0
push 8
call fcn.00503820
add esp, 8
mov edx, dword [ebp + 0xc]
mov dword [0x642be8], edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.0048b3e0
add esp, 4
movzx ecx, ax
mov dword [0x642bec], ecx
mov edx, dword [ebp + 0xc]
add edx, 0x39
mov dword [ebp + 0xc], edx
lea eax, [ebp + 0xc]
push eax
call fcn.005042c0
add esp, 4
movzx ecx, ax
mov dword [ebp - 0x28], ecx
cmp dword [ebp - 0x28], 0x2000
jle 0x5034b5
push 0
push 3
call fcn.00503820
add esp, 8
xor al, al
jmp 0x503788
mov edx, dword [ebp - 0x28]
sub edx, 0x39
mov dword [ebp - 0x28], edx
mov eax, dword [ebp - 0x28]
sub eax, 2
mov dword [ebp - 0x28], eax
push 4
lea ecx, [ebp - 0x30]
call fcn.00491740
mov ecx, dword [ebp - 0x28]
push ecx
mov edx, dword [ebp + 0xc]
push edx
lea ecx, [ebp - 0x30]
call fcn.0049ab40
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x24]
push eax
lea ecx, [ebp - 0x30]
push ecx
call fcn.00503b90
add esp, 8
movzx edx, al
test edx, edx
jne 0x503526
push 0
push 4
call fcn.00503820
add esp, 8
mov byte [ebp - 0x55], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x30]
call fcn.0049aff0
mov al, byte [ebp - 0x55]
jmp 0x503788
push 0xd0
call fcn.0047f6b3
add esp, 4
mov dword [ebp - 0x60], eax
mov byte [ebp - 4], 1
cmp dword [ebp - 0x60], 0
je 0x50354d
mov ecx, dword [ebp - 0x60]
call fcn.00504040
mov dword [ebp - 0x68], eax
jmp 0x503554
mov dword [ebp - 0x68], 0
mov eax, dword [ebp - 0x68]
mov dword [ebp - 0x5c], eax
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x5c]
mov dword [0x642c08], ecx
mov edx, dword [0x642c08]
push edx
mov eax, dword [0x642bec]
push eax
lea ecx, [ebp - 0x30]
call fcn.004a10c0
push eax
call fcn.00530d80
add esp, 0xc
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
je 0x5035b5
push 0
push 5
call fcn.00503820
add esp, 8
mov byte [ebp - 0x61], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x30]
call fcn.0049aff0
mov al, byte [ebp - 0x61]
jmp 0x503788
lea ecx, [ebp - 0x30]
call fcn.004a10c0
mov dword [ebp + 0xc], eax
mov ecx, dword [ebp + 0xc]
add ecx, dword [0x642bec]
mov dword [ebp - 0x3c], ecx
mov edx, dword [ebp - 0x3c]
push edx
call fcn.00503920
add esp, 4
call fcn.0053f88e
and eax, 0x800000ff
jns 0x5035eb
dec eax
or eax, 0xffffff00
inc eax
add eax, dword [0x642be0]
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x48], 0
push 1
lea eax, [ebp - 0x48]
push eax
mov ecx, 4
imul edx, ecx, 0
mov eax, dword [0x642c08]
mov ecx, dword [eax + edx + 0x5c]
push ecx
call fcn.00503d40
add esp, 0xc
mov dword [ebp - 0x50], eax
xor edx, edx
mov word [ebp - 0x54], dx
cmp dword [ebp - 0x50], 0
je 0x50365d
mov eax, dword [ebp - 0x40]
mov dword [0x642c0c], eax
mov ecx, dword [ebp - 0x48]
push ecx
mov edx, dword [ebp - 0x50]
push edx
mov eax, dword [0x642c0c]
push eax
call fcn.0053cf40
add esp, 0xc
mov ecx, dword [ebp - 0x40]
add ecx, dword [ebp - 0x48]
mov dword [ebp - 0x40], ecx
mov dx, word [ebp - 0x54]
add dx, 1
mov word [ebp - 0x54], dx
call fcn.0053f88e
and eax, 0x800000ff
jns 0x503670
dec eax
or eax, 0xffffff00
inc eax
add eax, dword [ebp - 0x40]
mov dword [ebp - 0x40], eax
push 2
lea eax, [ebp - 0x48]
push eax
mov ecx, 4
imul edx, ecx, 0
mov eax, dword [0x642c08]
mov ecx, dword [eax + edx + 0x5c]
push ecx
call fcn.00503d40
add esp, 0xc
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 0
je 0x5036d4
mov edx, dword [ebp - 0x40]
mov dword [0x642c10], edx
mov eax, dword [ebp - 0x48]
push eax
mov ecx, dword [ebp - 0x50]
push ecx
mov edx, dword [0x642c10]
push edx
call fcn.0053cf40
add esp, 0xc
mov eax, dword [ebp - 0x40]
add eax, dword [ebp - 0x48]
mov dword [ebp - 0x40], eax
mov cx, word [ebp - 0x54]
add cx, 1
mov word [ebp - 0x54], cx
call fcn.0053f88e
and eax, 0x800000ff
jns 0x5036e7
dec eax
or eax, 0xffffff00
inc eax
add eax, dword [ebp - 0x40]
mov dword [ebp - 0x40], eax
push 3
lea edx, [ebp - 0x48]
push edx
mov eax, 4
imul ecx, eax, 0
mov edx, dword [0x642c08]
mov eax, dword [edx + ecx + 0x5c]
push eax
call fcn.00503d40
add esp, 0xc
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 0
je 0x50374c
mov ecx, dword [ebp - 0x40]
mov dword [0x642c14], ecx
mov edx, dword [ebp - 0x48]
push edx
mov eax, dword [ebp - 0x50]
push eax
mov ecx, dword [0x642c14]
push ecx
call fcn.0053cf40
add esp, 0xc
mov edx, dword [ebp - 0x40]
add edx, dword [ebp - 0x48]
mov dword [ebp - 0x40], edx
mov ax, word [ebp - 0x54]
add ax, 1
mov word [ebp - 0x54], ax
mov ecx, dword [0x642c08]
mov edx, dword [ecx + 0x12]
or edx, 0x4000
mov eax, dword [0x642c08]
mov dword [eax + 0x12], edx
movzx ecx, word [ebp - 0x54]
push ecx
push 6
call fcn.00503820
add esp, 8
mov byte [ebp - 0x62], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x30]
call fcn.0049aff0
mov al, byte [ebp - 0x62]
push edx
mov ecx, ebp
push eax
lea edx, [0x5037c0]
call fcn.005394c7
pop eax
pop edx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0053957c
add esp, 0x68
cmp ebp, esp
call fcn.0053951b
mov esp, ebp
pop ebp
ret