Function at 0x10041370
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 [0x100a500c]
xor eax, ebp
mov dword [esp + 0x28], eax
push 0x100a57dc
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov esi, dword [0x100a5764]
test esi, esi
jne 0x1004165c
push 0x100a57dc
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov ecx, 0x61c
call fcn.10011e30
mov esi, eax
test eax, eax
je 0x10041703
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 [0x100a5774]
xor cl, 1
mov byte [esi + 0x40], cl
test edi, edi
je 0x1004164e
mov ecx, dword [edi + 0xc]
mov edx, ecx
and edx, 3
cmp edx, 1
je 0x10041673
cmp edx, 2
je 0x1004171d
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 0x100416ee
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 0x10041455
mov eax, dword [edi]
test eax, eax
jne 0x1004145d
mov eax, dword [0x100a5024]
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 + 4], 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 + 8], 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 0x100414a8
mov esi, edi
shl esi, 6
mov dword [esp], edi
add esi, edi
mov ebx, ecx
shl ebx, 0xc
cmp esi, ebx
jae 0x1004150f
cmp ecx, dword [esp + 8]
ja 0x10041507
cmp edx, 2
ja 0x1004150f
mov edi, dword [esp]
lea esi, [edi + 0x1000]
cmp edi, 0xfc001
mov edi, dword [esp + 8]
jb 0x1004149a
mov ebx, 0xfd000
jmp 0x10041512
imul esi, dword [esp], 0x62
cmp esi, ebx
jb 0x100414e6
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 + 8]
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 0x10041594
lea eax, [edi + 1]
cmp eax, 8
jbe 0x10041680
cmp eax, 0x1f0
ja 0x1004157b
and edi, 0xfffffff0
add edi, 0x10
mov eax, dword [esp + 4]
inc eax
jmp 0x10041472
cmp eax, 0xf00
ja 0x100416b4
and edi, 0xffffff00
add edi, 0x100
jmp 0x10041571
push 0x100a572c
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
cmp byte [esp + 0x10], 0
je 0x10041636
lea edi, [esp + 0x18]
push edi
call sym.mozglue.dll_class_mozilla::Maybe_unsigned_long_long_unsigned___int64_____cdecl_mozilla::RandomUint64_void_
add esp, 4
cmp byte [edi + 8], 0
je 0x100416d9
xor esi, esi
dec esi
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
or ecx, eax
je 0x100416c5
mov ecx, dword [0x100a5750]
test ecx, ecx
je 0x10041602
xor edx, edx
cmp dword [ecx + 8], eax
setb dl
cmova edx, esi
cmp edx, 0xffffffff
jne 0x100415f2
mov ecx, dword [ecx]
jmp 0x100415da
test edx, edx
je 0x100416c5
mov ecx, dword [ecx + 4]
and ecx, 0xfffffffe
jmp 0x100415da
mov esi, dword [esp + 0xc]
mov dword [esi + 8], eax
mov ecx, 0x100a5750
mov edx, esi
call fcn.10011fe0
mov eax, 0x100a572c
push eax
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0x28]
xor ecx, ebp
call fcn.1004fb50
mov eax, esi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [0x100a5748]
lea ecx, [eax + 1]
mov dword [0x100a5748], ecx
mov dword [esi + 8], eax
mov ecx, 0x100a574c
jmp 0x1004160e
mov dword [esi + 0x50], 0
xor ecx, ecx
jmp 0x10041422
mov eax, dword [esi]
mov dword [0x100a5764], eax
push 0x100a57dc
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
jmp 0x100413c5
mov cl, 1
mov byte [esi + 0x40], cl
mov ecx, dword [edi + 0xc]
jmp 0x10041413
test edi, edi
je 0x100416ad
bsr ecx, dword [esp + 8]
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 0x10041571
mov ecx, 0x20
jmp 0x1004168c
add edi, 0x1000
and edi, 0x1ff000
jmp 0x10041571
push edi
call sym.mozglue.dll_class_mozilla::Maybe_unsigned_long_long_unsigned___int64_____cdecl_mozilla::RandomUint64_void_
add esp, 4
cmp byte [esp + 0x20], 0
jne 0x100415c4
mov dword [sym.mozglue.dll_gMozCrashReason], str.MOZ_RELEASE_ASSERT_maybeRandomId.isSome___
int3
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.10054c10
mov esi, dword [0x100a5744]
jmp 0x10041621
xor ecx, ecx
jmp 0x10041675