Function at 0x408ac0
Capabilities:
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov edi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x28], edx
cmp word [edi], 0
mov dword [ebp - 0x24], ecx
je 0x408e50
mov eax, edi
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x408ae8
sub eax, edi
lea esi, [eax + 0x16]
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x2c], 0xdeadbeef
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x20]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x28]
mov dword [esp + 0x14], 0x14
mov dword [esp + 0xc], 4
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x30]
mov dword [esp], 0
mov dword [esp + 4], eax
mov eax, dword [sym.imp.kernel32.dll_QueryActCtxW]
mov dword [ebp - 0x38], eax
call eax
sub esp, 0x1c
mov dword [ebp - 0x34], eax
call fcn.0057d110
mov dword [eax], 0x58109f
mov dword [eax + 4], ebx
xor eax, eax
mov dword [esp + 4], str.QueryActCtx_succeeded_n
mov edx, dword [ebp - 0x34]
test edx, edx
sete al
mov dword [esp], eax
call fcn.00401dd0
call fcn.0057d110
mov dword [eax], 0x58109f
mov edx, dword fs:[0x18]
mov dword [eax + 4], ebx
mov eax, dword [edx + 0x34]
mov dword [esp + 4], 0x582472
mov dword [esp + 8], eax
cmp dword [edx + 0x34], 0x7a
sete al
mov dword [ebp - 0x34], edx
movzx eax, al
mov dword [esp], eax
call fcn.00401dd0
call fcn.0057d110
mov dword [eax], 0x58109f
mov dword [eax + 4], ebx
mov eax, dword [ebp - 0x2c]
mov dword [esp + 0xc], esi
cmp eax, esi
mov dword [esp + 8], eax
sete al
mov dword [esp + 4], str.size_Iu__expected__Iu_n
movzx eax, al
mov dword [esp], eax
call fcn.00401dd0
mov eax, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x34]
cmp eax, 0xdeadbeef
je 0x408e28
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [edx + 0x30]
mov dword [ebp - 0x3c], edx
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov ecx, dword [ebp - 0x2c]
sub esp, 0xc
mov esi, eax
mov dword [esp + 8], ecx
mov dword [ebp - 0x34], ecx
mov dword [esp + 4], 0xfe
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_memset]
lea eax, [ebp - 0x2c]
mov dword [esp + 0x18], eax
mov ecx, dword [ebp - 0x34]
lea eax, [ebp - 0x28]
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], ecx
mov dword [esp + 0xc], 4
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x30]
mov dword [esp], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x38]
call eax
sub esp, 0x1c
mov dword [ebp - 0x30], eax
call fcn.0057d110
mov edx, dword [ebp - 0x3c]
mov dword [eax], 0x58109f
mov dword [eax + 4], ebx
mov eax, dword [edx + 0x34]
mov dword [esp + 4], str.QueryActCtx_failed:__lu_n
mov dword [esp + 8], eax
mov ecx, dword [ebp - 0x30]
mov dword [esp], ecx
call fcn.00401dd0
call fcn.0057d110
mov dword [eax], 0x58109f
mov dword [eax + 4], ebx
mov eax, dword [ebp - 0x2c]
mov dword [esp + 4], str.size_Iu__expected_0_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401dd0
call fcn.0057d110
mov dword [eax], 0x58109f
mov dword [eax + 4], ebx
mov eax, dword [esi]
mov dword [esp + 4], str.info__ulFlags_lx__expected_2_n
cmp eax, 2
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401dd0
call fcn.0057d110
mov dword [eax], 0x58109f
mov dword [eax + 4], ebx
cmp word [edi], 0
je 0x408e5a
mov eax, edi
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x408d00
sub eax, edi
mov ecx, dword [esi + 4]
mov edx, edi
sar eax, 1
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x408d18
sub edx, edi
mov dword [esp + 0xc], eax
xor eax, eax
cmp edx, ecx
sete al
mov dword [esp + 8], ecx
mov dword [esp], eax
mov dword [esp + 4], str.info__ulFilenameLength_lu__expected__usizeof_WCHAR__n
call fcn.00401dd0
call fcn.0057d110
mov dword [eax], 0x58109f
mov dword [eax + 4], ebx
mov eax, dword [esi + 8]
mov dword [esp + 4], str.info__ulPathLength_lu_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401dd0
call fcn.0057d110
mov dword [eax], 0x58109f
mov dword [eax + 4], ebx
xor eax, eax
mov dword [esp + 4], str.info__lpFileName__NULL_n
mov ecx, dword [esi + 0xc]
test ecx, ecx
setne al
mov dword [esp], eax
call fcn.00401dd0
mov eax, dword [esi + 0xc]
test eax, eax
je 0x408dd0
mov eax, ebx
call fcn.004012e0
mov dword [esp + 4], edi
mov eax, dword [esi + 0xc]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_lstrcmpiW]
sub esp, 8
test eax, eax
sete al
mov dword [esp + 4], str.unexpected_info__lpFileName_n
movzx eax, al
mov dword [esp], eax
call fcn.00401dd0
call fcn.0057d110
mov dword [eax + 4], ebx
mov dword [eax], 0x58109f
xor eax, eax
mov dword [esp + 4], str.info__lpFilePath___NULL_n
mov edx, dword [esi + 0x10]
test edx, edx
sete al
mov dword [esp], eax
call fcn.00401dd0
mov dword [esp + 8], esi
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]
sub esp, 0xc
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, 0x3de
call fcn.004012e0
mov dword [esp], str.bad_size_n
call fcn.00401860
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov esi, 0x16
jmp 0x408af6
mov ecx, dword [esi + 4]
xor edx, edx
xor eax, eax
jmp 0x408d23