Function at 0x40b900
Capabilities:
Get process heap flags
Parse pe header

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0xb08
mov eax, dword [ecx + 4]
mov ebx, dword [ecx + 0xc]
mov dword [ebp - 0x6a8], 0x690
mov edx, dword [ecx + 8]
lea ecx, [ebp - 0x6a8]
mov dword [esp + 0xc], ecx
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov eax, dword [ebx + 0x9c]
mov eax, dword [eax + 8]
mov dword [esp], eax
call sym._SymGetModuleInfo64_16
sub esp, 0x10
test eax, eax
je 0x40b964
mov eax, dword [ebx + 0x9c]
mov eax, dword [eax + 0x2c]
mov eax, dword [eax]
cmp dword [ebp - 0x20], eax
je 0x40b980
lea esp, [ebp - 0x10]
mov eax, 1
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0x10
lea esi, [ebx + 0x1b8]
mov ecx, 0xf
mov edx, str._library_name_
mov eax, esi
call sym._reply_buffer_append
cmp dword [ebp - 0x564], 0x7364765b
je 0x40bab7
cmp byte [ebp - 0x564], 0x2f
lea edx, [ebp - 0x564]
je 0x40bada
lea eax, [ebp - 0xaa8]
mov dword [esp + 4], edx
mov edi, eax
mov dword [ebp - 0xae0], eax
mov dword [esp], eax
call dword [sym.imp.ntdll.dll_RtlInitAnsiString]
lea eax, [ebp - 0xac4]
sub esp, 8
mov dword [ebp - 0xae8], eax
mov dword [esp + 4], edi
mov dword [esp + 8], 1
mov dword [esp], eax
call dword [sym.imp.ntdll.dll_RtlAnsiStringToUnicodeString]
mov eax, dword [ebp - 0xac0]
sub esp, 0xc
mov dword [esp], eax
call sym._wine_get_unix_file_name
lea edx, [ebp - 0x564]
test eax, eax
mov edi, eax
je 0x40bd49
lea eax, [ebp - 0xad0]
mov dword [esp + 4], eax
mov dword [ebp - 0xaec], eax
mov eax, dword [ebx + 0x9c]
mov eax, dword [eax + 8]
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_IsWow64Process]
mov dword [ebp - 0xadc], eax
call eax
sub esp, 8
test eax, eax
je 0x40ba76
mov edx, dword [ebp - 0xad0]
test edx, edx
je 0x40ba76
mov dword [esp + 4], str.system32
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_strstr]
test eax, eax
je 0x40ba76
mov dword [eax], 0x77737973
mov dword [eax + 4], 0x3436776f
mov edx, edi
mov eax, esi
call dbg.reply_buffer_append_xmlstr
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov eax, dword [ebp - 0xae8]
sub esp, 0xc
mov dword [esp], eax
call dword [sym.imp.ntdll.dll_RtlFreeUnicodeString]
sub esp, 4
jmp 0x40bb10
cmp dword [ebp - 0x560], 0x732e5d6f
jne 0x40b9a7
cmp word [ebp - 0x55c], 0x6f
mov edx, str.linux_vdso.so.1
jne 0x40b9a7
mov eax, esi
call dbg.reply_buffer_append_xmlstr
lea eax, [ebp - 0xaa8]
mov dword [ebp - 0xae0], eax
lea eax, [ebp - 0xac4]
mov dword [ebp - 0xae8], eax
lea eax, [ebp - 0xad0]
mov dword [ebp - 0xaec], eax
mov eax, dword [sym.imp.kernel32.dll_IsWow64Process]
mov dword [ebp - 0xadc], eax
mov ecx, 2
mov edx, 0x43c868
mov eax, esi
call sym._reply_buffer_append
mov eax, dword [ebp - 0xae8]
mov dword [esp + 0xc], 0x1c
mov dword [ebp - 0xad4], 0x400
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x6a0]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x9c]
mov eax, dword [eax + 8]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_VirtualQueryEx]
sub esp, 0x10
cmp eax, 0x1b
jbe 0x40bb71
cmp dword [ebp - 0xaac], 0x1000000
je 0x40bcab
mov edi, dword [ebp - 0xae0]
mov ecx, 0x100
xor eax, eax
rep stosd dword es:[edi], eax
mov edi, dword [ebp - 0xae0]
mov dword [ebp - 0xae4], edi
mov eax, dword [ebp - 0xaec]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x9c]
mov eax, dword [eax + 8]
mov dword [esp], eax
mov eax, dword [ebp - 0xadc]
call eax
mov edi, dword [ebp - 0xae4]
sub esp, 8
lea edx, [edi + 0x18]
test eax, eax
je 0x40bc9a
mov eax, dword [ebp - 0xad0]
test eax, eax
je 0x40bc9a
movzx eax, word [edi + 0x14]
add eax, edx
mov dword [ebp - 0xadc], 0
mov edi, eax
lea ebx, [ebp - 0xacc]
lea esi, [esi]
mov eax, dword [ebp - 0xae0]
add eax, dword [ebp - 0xad4]
cmp edi, eax
jae 0x40bc84
mov edx, str._segment_address_0x
mov eax, esi
mov ecx, 0x14
call sym._reply_buffer_append
mov eax, dword [ebp - 0xae8]
mov edx, dword [edi + 0xc]
add edx, dword [ebp - 0x6a0]
lea esi, [esi]
mov ecx, edx
sub eax, 1
shr edx, 4
and ecx, 0xf
movzx ecx, byte [ecx + 0x43c48b]
mov byte [eax], cl
cmp eax, ebx
jne 0x40bc20
mov ecx, 8
mov edx, ebx
mov eax, esi
add edi, 0x28
call sym._reply_buffer_append
mov ecx, 3
mov edx, 0x43c756
mov eax, esi
call sym._reply_buffer_append
mov eax, dword [ebp - 0xae4]
mov edx, 1
add dword [ebp - 0xadc], 1
mov ecx, dword [ebp - 0xadc]
movzx eax, word [eax + 6]
test ax, ax
cmove eax, edx
cmp eax, ecx
ja 0x40bbe8
mov ecx, 0xa
mov edx, str.__library_
mov eax, esi
call sym._reply_buffer_append
jmp 0x40b964
mov eax, dword [ebp - 0xae4]
movzx eax, word [eax + 0x14]
add eax, edx
jmp 0x40bbd2
cmp dword [ebp - 0xab4], 0x10000
je 0x40bb71
lea eax, [ebp - 0xad4]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0xad4]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0xae0]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x6a0]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x9c]
mov eax, dword [eax + 8]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_ReadProcessMemory]
sub esp, 0x14
test eax, eax
je 0x40bb71
mov edx, dword [ebp - 0xad4]
cmp edx, 0x3f
jbe 0x40bb71
cmp word [ebp - 0xaa8], 0x5a4d
jne 0x40bb71
mov eax, dword [ebp - 0xa6c]
cmp edx, eax
jbe 0x40bb71
add eax, dword [ebp - 0xae0]
cmp dword [eax], 0x4550
mov dword [ebp - 0xae4], eax
jne 0x40bb71
jmp 0x40bb8c
mov eax, esi
call dbg.reply_buffer_append_xmlstr
lea eax, [ebp - 0xad0]
mov dword [ebp - 0xaec], eax
mov eax, dword [sym.imp.kernel32.dll_IsWow64Process]
mov dword [ebp - 0xadc], eax
jmp 0x40ba7f