Function at 0x10040920
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x30
mov edi, edx
mov dword [esp + 0x10], ecx
mov eax, dword [0x100a400c]
xor eax, ebp
mov dword [esp + 0x28], eax
push 0x100a47e0
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov esi, dword [0x100a4768]
test esi, esi
jne 0x10040c40
push 0x100a47e0
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov ecx, 0x61c
call fcn.100123e0
mov esi, eax
test eax, eax
je 0x10040cbe
lea eax, [esi + 0xc]
mov word [esi + 0x78], 0
xor edx, edx
mov dword [esi + 4], edx
mov dword [esi], edx
mov dword [esi + 8], edx
xorps xmm0, xmm0
movups xmmword [esi + 0x28], xmm0
mov dword [esi + 0x3c], edx
mov dword [esi + 0x38], edx
mov cl, byte [0x100a4778]
xor cl, 1
mov byte [esi + 0x40], cl
test edi, edi
je 0x10040c32
mov ecx, dword [edi + 0xc]
mov edx, ecx
and edx, 3
cmp edx, 1
je 0x10040c57
cmp edx, 2
je 0x10040ced
shr ecx, 2
and ecx, 1
mov edx, dword [edi + 4]
mov dword [esi + 0x50], edx
mov edx, dword [edi + 8]
mov dword [esi + 0x54], edx
mov dword [eax + 0x18], ecx
push 0x1388
push eax
call dword [sym.imp.kernel32.dll_InitializeCriticalSectionAndSpinCount]
test eax, eax
je 0x10040ca9
xor eax, eax
mov dword [esi + 0x44], eax
mov ecx, dword [esp + 0x10]
mov byte [esi + 0x41], cl
mov dword [esi + 0x48], eax
test edi, edi
je 0x10040a05
mov eax, dword [edi]
test eax, eax
jne 0x10040a0d
mov eax, dword [0x100a4024]
shr eax, 3
mov dword [esi + 0x4c], eax
mov dword [esi + 0x58], 0
mov edi, 8
xor eax, eax
mov dword [esp + 0xc], esi
mov dword [esp + 8], eax
mov ecx, eax
shl ecx, 5
xor eax, eax
mov dword [esi + ecx + 0x5c], eax
mov dword [esi + ecx + 0x60], eax
mov dword [esi + ecx + 0x64], edi
mov dword [esp + 0x14], ecx
mov dword [esi + ecx + 0x74], eax
mov esi, 0x1000
mov dword [esp + 4], edi
lea eax, [esi - 0xc]
xor edx, edx
div edi
inc eax
mov ecx, edi
mov edi, esi
mov esi, ecx
dec eax
mov edx, eax
shr edx, 5
mov ecx, eax
and ecx, 0x1f
cmp ecx, 1
sbb edx, 0xffffffff
mov ebx, eax
imul ebx, esi
mov ecx, edi
sub ecx, ebx
lea ebx, [edx*4 + 0xc]
cmp ebx, ecx
ja 0x10040a58
mov esi, edi
shl esi, 6
mov dword [esp], edi
add esi, edi
mov ebx, ecx
shl ebx, 0xc
cmp esi, ebx
jae 0x10040abf
cmp ecx, dword [esp + 4]
ja 0x10040ab7
cmp edx, 2
ja 0x10040abf
mov edi, dword [esp]
lea esi, [edi + 0x1000]
cmp edi, 0xfc001
mov edi, dword [esp + 4]
jb 0x10040a4a
mov ebx, 0xfd000
jmp 0x10040ac2
imul esi, dword [esp], 0x62
cmp esi, ebx
jb 0x10040a96
mov ebx, dword [esp]
shr ebx, 0xc
mov esi, dword [esp + 0xc]
mov edi, dword [esp + 0x14]
mov byte [esi + edi + 0x7a], bl
mov dword [esi + edi + 0x68], eax
mov dword [esi + edi + 0x6c], edx
mov dword [esi + edi + 0x70], ecx
mov ebx, edi
mov eax, 0x1ffff
xor edx, edx
mov edi, dword [esp + 4]
div edi
mov eax, edi
sub eax, edx
mov ecx, 0x1ffff
add eax, ecx
xor edx, edx
div edi
mov word [esi + ebx + 0x78], ax
cmp edi, 0xf00
je 0x10040b44
lea eax, [edi + 1]
cmp eax, 8
jbe 0x10040c64
cmp eax, 0x1f0
ja 0x10040b2b
and edi, 0xfffffff0
add edi, 0x10
mov eax, dword [esp + 8]
inc eax
jmp 0x10040a22
cmp eax, 0xf00
ja 0x10040c98
and edi, 0xffffff00
add edi, 0x100
jmp 0x10040b21
push 0x100a472c
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
cmp byte [esp + 0x10], 0
je 0x10040c1a
mov esi, dword [esi + 0x24]
xor eax, eax
test esi, esi
setne al
lea eax, [eax*4 + 0x24]
mov dword [esp + 4], eax
mov eax, 0x100a4750
mov edi, 0x100a4754
cmove edi, eax
mov ebx, 0xffffffff
lea eax, [esp + 0x18]
push eax
call sym.mozglue.dll_class_mozilla::Maybe_unsigned_long_long_unsigned___int64_____cdecl_mozilla::RandomUint64_void_
add esp, 4
cmp byte [esp + 0x20], 0
je 0x10040cd8
mov eax, dword [esp + 0x18]
test esi, esi
je 0x10040baa
or eax, 1
mov ecx, dword [esp + 0x1c]
jmp 0x10040baf
and eax, 0xfffffffe
mov ecx, esi
or ecx, eax
je 0x10040b81
mov ecx, dword [esp + 4]
mov ecx, dword [ecx + 0x100a472c]
test ecx, ecx
mov esi, dword [esp + 0xc]
je 0x10040bed
xor edx, edx
cmp dword [ecx + 8], eax
setb dl
cmova edx, ebx
cmp edx, 0xffffffff
jne 0x10040bdd
mov ecx, dword [ecx]
test ecx, ecx
jne 0x10040bc5
jmp 0x10040bed
test edx, edx
je 0x10040cf4
mov ecx, dword [ecx + 4]
and ecx, 0xfffffffe
jmp 0x10040bd7
mov dword [esi + 8], eax
mov ecx, edi
mov edx, esi
call fcn.10012590
mov eax, 0x100a472c
push eax
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0x28]
xor ecx, ebp
call fcn.1004f020
mov eax, esi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [0x100a4748]
lea ecx, [eax + 1]
mov dword [0x100a4748], ecx
mov dword [esi + 8], eax
mov ecx, 0x100a474c
jmp 0x10040bf2
mov dword [esi + 0x50], 0
xor ecx, ecx
jmp 0x100409d2
mov eax, dword [esi]
mov dword [0x100a4768], eax
push 0x100a47e0
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
jmp 0x10040975
mov cl, 1
mov byte [esi + 0x40], cl
mov ecx, dword [edi + 0xc]
jmp 0x100409c3
test edi, edi
je 0x10040c91
bsr ecx, dword [esp + 4]
xor ecx, 0x1f
neg cl
xor edi, edi
inc edi
shl edi, cl
cmp edi, 9
mov ecx, 8
cmovb edi, ecx
cmp eax, 2
cmovb edi, ecx
mov esi, dword [esp + 0xc]
jmp 0x10040b21
mov ecx, 0x20
jmp 0x10040c70
add edi, 0x1000
and edi, 0x1ff000
jmp 0x10040b21
mov dword [sym.mozglue.dll_gMozCrashReason], str.MOZ_RELEASE_ASSERT_mLock.Init_doLock__
int3
mov ecx, str._jemalloc_
mov edx, str.:__malloc__Error_initializing_arena_n
call fcn.10054100
mov esi, dword [0x100a4744]
jmp 0x10040c05
mov dword [sym.mozglue.dll_gMozCrashReason], str.MOZ_RELEASE_ASSERT_maybeRandomId.isSome___
int3
xor ecx, ecx
jmp 0x10040c59
mov esi, dword [esi + 0x24]
jmp 0x10040b81