Function at 0x407990
Capabilities:
Parse pe header
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x10
mov edi, dword [ebp + 8]
mov esi, edx
mov dword [ebp - 0x10], ecx
push 0x30
call dword [sym.imp.mozglue.dll_moz_xmalloc]
add esp, 4
mov dword [eax + 4], 1
mov dword [eax + 8], 1
mov dword [eax], 0x43e240
mov dword [eax + 0xc], edi
mov dword [eax + 0x14], 0
mov ebx, eax
lea ecx, [eax + 0xc]
mov dword [eax + 0x18], 0x10
lea eax, [eax + 0x1c]
mov edx, 0x40
mov dword [ebp - 0x18], esi
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x2c], esi
call fcn.00407da0
cmp dword [ebx + 0x2c], 0
je 0x407bd0
cmp dword [ebx + 0x14], 0
je 0x407bd0
mov eax, dword [ebx + 0x10]
test eax, eax
je 0x407bd0
movzx ecx, word [eax]
cmp ecx, 0x5a4d
jne 0x407bd0
mov esi, dword [eax + 0x3c]
add esi, dword [ebp - 0x18]
push 0x30
call dword [sym.imp.mozglue.dll_moz_xmalloc]
add esp, 4
lea edx, [eax + 0x1c]
mov dword [eax + 4], 1
mov dword [eax + 8], 1
mov dword [eax], 0x43e240
mov dword [eax + 0xc], edi
mov dword [eax + 0x14], 0
mov dword [eax + 0x18], 0x10
lea ecx, [eax + 0xc]
mov dword [eax + 0x10], edx
mov edx, 0xf8
mov dword [eax + 0x2c], esi
mov esi, eax
call fcn.00407da0
cmp dword [esi + 0x2c], 0
mov dword [ebp - 0x1c], esi
je 0x407bc3
cmp dword [esi + 0x14], 0
je 0x407bc3
mov edi, dword [esi + 0x10]
test edi, edi
je 0x407bc3
cmp dword [edi], 0x4550
jne 0x407bc3
movzx eax, word [edi + 0x18]
cmp eax, 0x10b
jne 0x407bc3
cmp dword [edi + 0x50], 0x137
jbe 0x407bc3
cmp dword [edi + 0x74], 0
mov dword [ebp - 0x14], ebx
je 0x407bf2
mov ebx, dword [edi + 0x78]
test ebx, ebx
je 0x407bf2
cmp dword [edi + 0x7c], 0
je 0x407bf2
add ebx, dword [ebp - 0x18]
push 0x30
call dword [sym.imp.mozglue.dll_moz_xmalloc]
add esp, 4
mov esi, eax
mov dword [eax + 4], 1
mov dword [eax + 8], 1
mov dword [eax], 0x43e240
lea ecx, [eax + 0xc]
mov eax, dword [ebp + 8]
lea edx, [esi + 0x1c]
mov dword [esi + 0xc], eax
mov dword [esi + 0x14], 0
mov dword [esi + 0x18], 0x10
mov dword [esi + 0x10], edx
mov edx, 0x28
mov dword [esi + 0x2c], ebx
call fcn.00407da0
cmp dword [esi + 0x2c], 0
je 0x407be2
cmp dword [esi + 0x14], 0
je 0x407be2
mov eax, dword [esi + 0x10]
test eax, eax
je 0x407be2
cmp dword [eax + 0x14], 0
je 0x407be2
mov ebx, dword [edi + 0x78]
mov edi, dword [edi + 0x7c]
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp + 8]
add edi, ebx
push eax
push edi
push ebx
push dword [ebp - 0x18]
call fcn.00407d30
add esp, 0x10
lock dec dword [esi + 4]
mov ebx, dword [ebp - 0x14]
jne 0x407b83
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
lock dec dword [esi + 8]
jne 0x407b83
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov esi, dword [ebp - 0x1c]
lock dec dword [esi + 4]
jne 0x407b9f
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
lock dec dword [esi + 8]
jne 0x407b9f
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
lock dec dword [ebx + 4]
jne 0x407bb8
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax]
lock dec dword [ebx + 8]
jne 0x407bb8
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 4]
mov eax, dword [ebp - 0x10]
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp + 8]
call fcn.00407c10
jmp 0x407b83
mov ecx, dword [ebp - 0x10]
mov edx, edi
call fcn.00407c10
lock dec dword [ebx + 4]
je 0x407ba5
jmp 0x407bb8
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp + 8]
call fcn.00407c10
jmp 0x407b67
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp + 8]
call fcn.00407c10
mov ebx, dword [ebp - 0x14]
jmp 0x407b83