Function at 0x408520
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x427f40]
cmp dword [eax + 0x22c], 0
jne 0x4088c8
add dword [eax + 0x1c], 1
mov ecx, dword [0x427f40]
mov eax, dword [ecx + 0x1c]
cmp eax, 0x18
jge 0x408566
mov dword [ecx + eax*4 + 0x20], 0x1f
mov ecx, dword [0x427f40]
cmp dword [ecx + 0x240], 0
je 0x408566
call fcn.00407ae0
mov ecx, dword [0x427f40]
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x18]
mov esi, dword [edi]
and esi, 0x7fffffff
jne 0x408693
cmp dword [ecx + 0x228], 0
je 0x40859a
mov dword [ecx + 0x22c], 0xd
mov ecx, dword [0x427f40]
jmp 0x4086a1
mov eax, str._nMIRACL_error_from_routine
call fcn.00407740
mov ecx, dword [0x427f40]
mov eax, dword [ecx + 0x1c]
cmp eax, 0x18
jge 0x4085bf
mov eax, dword [ecx + eax*4 + 0x20]
mov eax, dword [eax*4 + 0x426398]
jmp 0x4085c4
mov eax, 0x42352c
call fcn.00407740
call fcn.0041542e
add eax, 0x20
push eax
push 0xa
call fcn.004152ef
mov ecx, dword [0x427f40]
mov ebx, dword [ecx + 0x1c]
add esp, 8
sub ebx, 1
js 0x408682
lea ebp, [ebx*4 + 0x20]
mov al, 0x20
mov esi, str.______________called_from
lea esp, [esp]
movsx edi, al
call fcn.0041542e
add eax, 0x20
push eax
push edi
call fcn.004152ef
mov al, byte [esi + 1]
add esi, 1
add esp, 8
test al, al
jne 0x408600
cmp ebx, 0x18
jge 0x40863b
mov edx, dword [0x427f40]
mov eax, dword [edx + ebp]
mov eax, dword [eax*4 + 0x426398]
call fcn.00407740
jmp 0x408661
mov al, 0x3f
mov esi, 0x42352c
movsx edi, al
call fcn.0041542e
add eax, 0x20
push eax
push edi
call fcn.004152ef
mov al, byte [esi + 1]
add esi, 1
add esp, 8
test al, al
jne 0x408642
call fcn.0041542e
add eax, 0x20
push eax
push 0xa
call fcn.004152ef
sub ebx, 1
add esp, 8
sub ebp, 4
test ebx, ebx
jge 0x4085f5
mov eax, str.Flash_overflow_n
call fcn.00407740
push 0
call fcn.0041585f
cmp esi, 1
jne 0x4086a1
mov edx, dword [edi + 4]
cmp dword [edx], esi
jne 0x4086a1
xor esi, esi
cmp dword [esp + 0x1c], edi
jne 0x4086b7
push 7
call fcn.00407780
mov ecx, dword [0x427f40]
add esp, 4
mov ebp, dword [esp + 0x14]
mov eax, 0x7fff
test word [ebp + 2], ax
jne 0x4086cc
test word [edi + 2], ax
je 0x4086dc
push 0xc
call fcn.00407780
mov ecx, dword [0x427f40]
add esp, 4
mov eax, dword [ebp]
mov edi, eax
and eax, 0x7fffffff
mov ebx, eax
and edi, 0x80000000
cmp ebx, 1
jne 0x4086fc
mov eax, dword [ebp + 4]
cmp dword [eax], ebx
jne 0x4086fc
xor ebx, ebx
mov eax, dword [ecx + 0x18]
lea edx, [ebx + esi]
cmp edx, eax
jle 0x40872e
cmp dword [ecx + 0x80], 0
jne 0x408715
add eax, eax
cmp edx, eax
jle 0x40872e
cmp dword [ecx + 0x228], 0
je 0x408744
mov dword [ecx + 0x22c], 0xd
mov ecx, dword [0x427f40]
cmp dword [ecx + 0x22c], 0
je 0x408839
add dword [ecx + 0x1c], 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
ret
mov eax, str._nMIRACL_error_from_routine
call fcn.00407740
mov ecx, dword [0x427f40]
mov eax, dword [ecx + 0x1c]
cmp eax, 0x18
jge 0x408769
mov ecx, dword [ecx + eax*4 + 0x20]
mov eax, dword [ecx*4 + 0x426398]
jmp 0x40876e
mov eax, 0x42352c
call fcn.00407740
call fcn.0041542e
add eax, 0x20
push eax
push 0xa
call fcn.004152ef
mov edx, dword [0x427f40]
mov ebx, dword [edx + 0x1c]
add esp, 8
sub ebx, 1
js 0x408828
lea ebp, [ebx*4 + 0x20]
nop
mov al, 0x20
mov esi, str.______________called_from
movsx edi, al
call fcn.0041542e
add eax, 0x20
push eax
push edi
call fcn.004152ef
mov al, byte [esi + 1]
add esi, 1
add esp, 8
test al, al
jne 0x4087a7
cmp ebx, 0x18
jge 0x4087e1
mov eax, dword [0x427f40]
mov ecx, dword [eax + ebp]
mov eax, dword [ecx*4 + 0x426398]
call fcn.00407740
jmp 0x408807
mov al, 0x3f
mov esi, 0x42352c
movsx edi, al
call fcn.0041542e
add eax, 0x20
push eax
push edi
call fcn.004152ef
mov al, byte [esi + 1]
add esi, 1
add esp, 8
test al, al
jne 0x4087e8
call fcn.0041542e
add eax, 0x20
push eax
push 0xa
call fcn.004152ef
sub ebx, 1
add esp, 8
sub ebp, 4
test ebx, ebx
jge 0x4087a0
mov eax, str.Flash_overflow_n
call fcn.00407740
push 0
call fcn.0041585f
mov edx, dword [esp + 0x1c]
push edx
push ebp
call fcn.00408210
add esp, 8
cmp dword [ebp], 0
je 0x4088bb
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
and ecx, 0x80000000
xor edi, ecx
test esi, esi
jne 0x40887b
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx]
test eax, eax
je 0x4088bb
or eax, edi
pop edi
pop esi
mov dword [ecx], eax
mov eax, dword [0x427f40]
add dword [eax + 0x1c], 0xffffffff
pop ebp
pop ebx
ret
xor eax, eax
test esi, esi
jle 0x4088ae
lea ecx, [ebx*4]
jmp 0x408890
mov edx, dword [esp + 0x18]
mov edx, dword [edx + 4]
mov ebp, dword [esp + 0x1c]
mov edx, dword [edx + eax*4]
mov ebp, dword [ebp + 4]
mov dword [ecx + ebp], edx
add eax, 1
add ecx, 4
cmp eax, esi
jl 0x408890
mov eax, dword [esp + 0x1c]
shl esi, 0x10
add esi, ebx
or esi, edi
mov dword [eax], esi
mov eax, dword [0x427f40]
add dword [eax + 0x1c], 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
ret