Function at 0x51dc2e0
Capabilities:
Terminate process

Disassembly:
sub esp, 0x2c
push ebx
mov ebx, eax
shl eax, 4
mov edx, dword [eax + ecx - 0x14]
add eax, ecx
push ebp
mov dword [esp + 0x20], edx
mov edx, dword [eax - 8]
push edi
mov edi, dword [eax - 0x18]
mov eax, dword [eax - 4]
mov dword [esp + 0x2c], eax
lea eax, [ebx - 2]
shl eax, 4
mov ebp, dword [eax + ecx]
mov ebx, dword [eax + ecx + 4]
mov ecx, dword [esp + 0x2c]
cmp dword [esp + 0x24], ecx
mov dword [esp + 0x20], edi
mov dword [esp + 0x28], edx
jg 0x51dc32f
jl 0x51dc327
cmp edi, edx
jae 0x51dc32f
mov ecx, edi
mov dword [esp + 0xc], ecx
jmp 0x51dc335
mov dword [esp + 0xc], edx
mov ecx, edx
mov eax, dword [esp + 0x3c]
cmp dword [eax], ecx
jae 0x51dc38f
mov edx, dword [eax + 4]
add ecx, ecx
add ecx, ecx
push ecx
push edx
mov dword [esp + 0x18], ecx
call dword [sym.imp.MSVCR90.dll_realloc]
add esp, 8
test eax, eax
jne 0x51dc37c
mov eax, dword [esp + 0x10]
push eax
push str.Error_allocating_temporary_storage_for_tim_sort:_need__lu_bytes
call dword [sym.imp.MSVCR90.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
push 1
call dword [sym.imp.MSVCR90.dll_exit]
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0xc]
mov dword [ecx + 4], eax
mov dword [ecx], edx
mov edx, dword [esp + 0x28]
mov eax, ecx
mov ecx, dword [esp + 0x2c]
cmp dword [esp + 0x24], ecx
mov eax, dword [eax + 4]
mov dword [esp + 0x3c], eax
jg 0x51dc4de
jl 0x51dc3ae
cmp edi, edx
jae 0x51dc4de
lea edx, [edi*4]
push edx
lea ecx, [esi + ebp*4]
push ecx
push eax
call sub.MSVCR90.dll_memcpy
xor eax, eax
add esp, 0xc
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
mov edi, ebp
add edi, dword [esp + 0x20]
mov eax, ebx
adc eax, dword [esp + 0x24]
mov edx, ebp
add edx, dword [esp + 0x28]
mov dword [esp + 0x1c], eax
mov eax, ebx
adc eax, dword [esp + 0x2c]
mov ecx, edx
add ecx, dword [esp + 0x20]
mov dword [esp + 0x30], ebp
adc eax, dword [esp + 0x24]
mov dword [esp + 0x34], ebx
cmp ebx, eax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], eax
jg 0x51dc615
jl 0x51dc417
mov edx, ecx
cmp ebp, edx
jae 0x51dc615
mov ebx, dword [esp + 0x30]
jmp 0x51dc420
mov edx, dword [esp + 0x14]
cmp edx, dword [esp + 0x24]
jg 0x51dc4a5
mov ebp, dword [esp + 0x10]
jl 0x51dc436
cmp ebp, dword [esp + 0x20]
jae 0x51dc4a5
cmp dword [esp + 0x1c], eax
jg 0x51dc48d
jl 0x51dc442
cmp edi, ecx
jae 0x51dc48d
mov eax, dword [esp + 0x3c]
mov ecx, dword [eax + ebp*4]
mov edx, dword [esi + edi*4]
mov dword [esp + 0xc], ecx
call fcn.051dba20
cmp eax, 0xfffffffe
je 0x51dc460
neg eax
test eax, eax
jg 0x51dc47d
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 0x2c]
add ebp, 1
adc dword [esp + 0x14], 0
mov dword [esi + ebx*4], ecx
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x10], ebp
jmp 0x51dc4b3
mov eax, dword [esi + edi*4]
mov ecx, dword [esp + 0x28]
mov dword [esi + ebx*4], eax
mov eax, dword [esp + 0x2c]
jmp 0x51dc4ab
mov edx, dword [esp + 0x3c]
mov edx, dword [edx + ebp*4]
add ebp, 1
adc dword [esp + 0x14], 0
mov dword [esi + ebx*4], edx
mov dword [esp + 0x10], ebp
jmp 0x51dc4b3
mov edx, dword [esi + edi*4]
mov dword [esi + ebx*4], edx
add edi, 1
adc dword [esp + 0x1c], 0
mov edx, dword [esp + 0x34]
add ebx, 1
adc edx, 0
cmp edx, eax
mov dword [esp + 0x34], edx
jl 0x51dc420
jg 0x51dc615
cmp ebx, ecx
jb 0x51dc420
pop edi
pop ebp
pop ebx
add esp, 0x2c
ret
lea ecx, [edx*4]
push ecx
lea edx, [edi + ebp]
lea ecx, [esi + edx*4]
push ecx
push eax
call sub.MSVCR90.dll_memcpy
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x38]
add esp, 0xc
sub edx, 1
sbb eax, 0
mov dword [esp + 0x14], eax
mov ecx, ebp
add ecx, edi
mov eax, ebx
adc eax, dword [esp + 0x24]
sub ecx, 1
sbb eax, 0
mov dword [esp + 0x1c], eax
mov edi, ebp
add edi, dword [esp + 0x28]
mov eax, ebx
adc eax, dword [esp + 0x2c]
add edi, dword [esp + 0x20]
mov dword [esp + 0x10], edx
adc eax, dword [esp + 0x24]
sub edi, 1
sbb eax, 0
cmp eax, ebx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x34], eax
jl 0x51dc615
jg 0x51dc554
cmp edi, ebp
jb 0x51dc615
cmp dword [esp + 0x14], 0
jl 0x51dc5e3
jg 0x51dc565
test edx, edx
jb 0x51dc5e3
cmp dword [esp + 0x1c], ebx
jl 0x51dc5c7
jg 0x51dc571
cmp ecx, ebp
jb 0x51dc5c7
mov eax, dword [esp + 0x3c]
mov edx, dword [eax + edx*4]
mov ecx, dword [esi + ecx*4]
mov dword [esp + 0xc], edx
call fcn.051dba20
cmp eax, 0xfffffffe
je 0x51dc5ae
neg eax
test eax, eax
jle 0x51dc5ae
mov ecx, dword [esp + 0x18]
mov eax, dword [esi + ecx*4]
mov dword [esi + edi*4], eax
or eax, 0xffffffff
add dword [esp + 0x18], eax
mov ecx, dword [esp + 0x18]
adc dword [esp + 0x1c], eax
mov eax, dword [esp + 0x34]
jmp 0x51dc5f5
mov edx, dword [esp + 0xc]
mov ecx, dword [esp + 0x18]
or eax, 0xffffffff
add dword [esp + 0x10], eax
adc dword [esp + 0x14], eax
mov eax, dword [esp + 0x34]
jmp 0x51dc5f2
mov ecx, dword [esp + 0x3c]
mov ecx, dword [ecx + edx*4]
add edx, 0xffffffff
adc dword [esp + 0x14], 0xffffffff
mov dword [esi + edi*4], ecx
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x10], edx
jmp 0x51dc5f9
mov edx, dword [esi + ecx*4]
add ecx, 0xffffffff
adc dword [esp + 0x1c], 0xffffffff
mov dword [esp + 0x18], ecx
mov dword [esi + edi*4], edx
mov edx, dword [esp + 0x10]
add edi, 0xffffffff
adc eax, 0xffffffff
cmp eax, ebx
mov dword [esp + 0x34], eax
jg 0x51dc554
jl 0x51dc615
cmp edi, ebp
jae 0x51dc554
pop edi
pop ebp
pop ebx
add esp, 0x2c
ret