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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x5c
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
je 0x487e06
mov edx, dword [ebp - 0x34]
mov eax, dword [edx + 4]
test eax, eax
je 0x487c6b
mov edi, dword [eax]
mov dword [edx + 4], edi
mov dword [eax], 0
test edi, edi
jne 0x487a3f
jmp 0x487b2a
mov eax, dword [edi + 8]
mov dword [eax], 0
mov ebx, dword [ebp + 0x14]
test ebx, ebx
je 0x487a35
mov dword [esp + 4], ecx
mov ebx, dword [ebp + 8]
mov dword [esp], ebx
call dword [ebp + 0x14]
mov edi, dword [edi]
test edi, edi
je 0x487b2a
mov ecx, dword [edi + 4]
mov dword [ebp - 0x24], ecx
mov eax, dword [ecx + 0x14]
test ah, 0x80
jne 0x487a18
mov esi, dword [ebp - 0x34]
add esi, 8
mov dword [ebp - 0x2c], esi
mov ecx, dword [ebp - 0x24]
mov edx, dword [ecx + 0x24]
lea edx, [edi + edx + 0x14]
mov dword [ebp - 0x38], edx
mov ecx, dword [ecx + 0x3c]
mov esi, 1
shl esi, cl
mov dword [ebp - 0x30], esi
dec esi
mov dword [ebp - 0x1c], esi
test eax, 0x1000000
je 0x487c1b
lea eax, [edi + 0x14]
mov dword [ebp - 0x20], eax
mov ebx, eax
cmp edx, eax
jbe 0x487a35
xor esi, esi
mov dword [ebp - 0x28], edi
mov edi, edx
mov dword [ebp - 0x38], esi
lea esi, [esi]
mov edx, ebx
sub edx, dword [ebp - 0x20]
lea eax, [edx - 1]
xor eax, edx
lea ecx, [eax + 1]
shr ecx, 1
je 0x487aae
cmp dword [ebp - 0x1c], ecx
jae 0x487ab1
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x28]
mov dword [esp], edx
mov edx, ebx
mov esi, dword [ebp - 0x2c]
mov eax, dword [esi]
call fcn.004876b4
test eax, eax
je 0x487c50
add ebx, dword [eax + 0xc]
mov eax, dword [ebp - 0x24]
mov edx, dword [eax + 0x78]
cmp edx, 1
je 0x487bc1
cmp edi, ebx
jbe 0x487b1d
mov esi, dword [ebp - 0x38]
test edx, edx
je 0x487b09
cmp byte [ebx], 0
jne 0x487b84
xor eax, eax
jmp 0x487b02
cmp byte [ebx + eax], 0
jne 0x487b84
inc eax
cmp eax, edx
jb 0x487af8
jne 0x487b84
test esi, esi
jne 0x487b17
mov eax, ebx
sub eax, dword [ebp - 0x20]
test dword [ebp - 0x1c], eax
je 0x487b94
add ebx, edx
cmp edi, ebx
ja 0x487ae4
mov edi, dword [ebp - 0x28]
mov edi, dword [edi]
test edi, edi
jne 0x487a3f
mov ebx, dword [ebp - 0x34]
mov edx, dword [ebx + 8]
mov eax, dword [edx + 0x20]
test eax, eax
je 0x487c6b
cmp dword [edx + 0x2c], 0
jne 0x487c80
xor edx, edx
xor ebx, ebx
jmp 0x487b69
mov ebx, dword [eax + 0x10]
lea edx, [edx + ebx - 1]
neg ebx
and edx, ebx
mov dword [eax + 0x14], edx
add edx, dword [eax + 0xc]
mov eax, dword [eax + 0x1c]
test eax, eax
je 0x487e13
mov ebx, ecx
mov ecx, dword [eax + 0x18]
cmp dword [ecx + 0x10], 0
jne 0x487b4b
test ebx, ebx
je 0x487b7c
mov ebx, dword [ebx + 4]
mov dword [ebx + 0x24], edx
mov dword [ecx + 0x10], eax
xor edx, edx
jmp 0x487b4b
mov dword [ebp - 0x38], esi
cmp edi, ebx
ja 0x487a98
jmp 0x487b1d
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
mov ecx, dword [ebp - 0x30]
mov edx, ebx
mov esi, dword [ebp - 0x2c]
mov eax, dword [esi]
call fcn.004876b4
test eax, eax
je 0x487c50
mov eax, dword [ebp - 0x24]
mov edx, dword [eax + 0x78]
mov esi, 1
jmp 0x487b17
cmp edi, ebx
jbe 0x487b1d
cmp byte [ebx], 0
jne 0x487a98
mov eax, dword [ebp - 0x38]
jmp 0x487bea
inc ebx
cmp edi, ebx
jbe 0x487b1d
cmp byte [ebx], 0
jne 0x487c78
test eax, eax
jne 0x487bd8
mov edx, ebx
sub edx, dword [ebp - 0x20]
test dword [ebp - 0x1c], edx
jne 0x487bd8
mov edx, dword [ebp - 0x28]
mov dword [esp], edx
mov ecx, dword [ebp - 0x30]
mov edx, 0x4f0ade
mov esi, dword [ebp - 0x2c]
mov eax, dword [esi]
call fcn.004876b4
test eax, eax
je 0x487c50
mov eax, 1
jmp 0x487bd8
lea ebx, [edi + 0x14]
cmp dword [ebp - 0x38], ebx
jbe 0x487a35
mov esi, dword [ebp - 0x2c]
jmp 0x487c3b
mov edx, dword [ebp - 0x24]
add ebx, dword [edx + 0x78]
cmp dword [ebp - 0x38], ebx
jbe 0x487a35
mov dword [esp], edi
mov ecx, 1
mov edx, ebx
mov eax, dword [esi]
call fcn.004876b4
test eax, eax
jne 0x487c2c
mov ecx, dword [ebp - 0x34]
mov eax, dword [ecx + 4]
test eax, eax
je 0x487c6b
nop
mov edx, dword [eax + 8]
mov dword [edx], 0
mov eax, dword [eax]
test eax, eax
jne 0x487c5c
mov ecx, dword [ebp - 0x34]
mov ecx, dword [ecx]
mov dword [ebp - 0x34], ecx
jmp 0x4879eb
mov dword [ebp - 0x38], eax
jmp 0x487a98
mov ebx, dword [ebp - 0x34]
add ebx, 8
mov dword [ebp - 0x20], ebx
mov eax, dword [edx + 0x1c]
shl eax, 2
mov dword [esp], eax
call fcn.00437dcc
mov ebx, eax
test eax, eax
je 0x487dbc
mov esi, dword [ebp - 0x34]
mov esi, dword [esi + 8]
mov dword [ebp - 0x1c], esi
mov eax, dword [esi + 0x20]
mov esi, ebx
xor edx, edx
mov dword [ebp - 0x24], ebx
jmp 0x487cd6
mov dword [esi], eax
add esi, 4
mov edi, dword [ebp - 0x20]
mov edi, dword [edi]
mov edi, dword [edi + 0x28]
sub dword [eax + 0xc], edi
cmp ecx, edx
je 0x487cd1
test edx, edx
je 0x487cd1
or ecx, 0xffffffff
mov eax, dword [eax + 0x1c]
mov edx, ecx
test eax, eax
je 0x487ce5
mov ecx, dword [eax + 0x10]
test ecx, ecx
jne 0x487cb6
mov ecx, edx
jmp 0x487cd1
mov ebx, dword [ebp - 0x24]
mov eax, esi
sub eax, ebx
sar eax, 2
mov edi, dword [ebp - 0x1c]
mov dword [edi + 0x1c], eax
test eax, eax
je 0x487db4
mov ecx, 0x4873cc
cmp edx, 0xffffffff
je 0x487d16
mov ecx, 0x48744c
cmp dword [edi + 0x28], edx
jb 0x487d16
mov ecx, 0x4873cc
mov dword [esp + 0xc], ecx
mov dword [esp + 8], 4
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.msvcrt.dll_qsort
lea ecx, [esi - 4]
mov esi, dword [esi - 4]
mov edx, dword [ebp - 0x34]
mov eax, dword [edx + 8]
mov eax, dword [eax + 0x28]
add dword [esi + 0xc], eax
mov dword [ebp - 0x2c], ebx
sub ecx, 4
cmp dword [ebp - 0x2c], ecx
ja 0x487db1
mov edi, dword [ecx]
mov ebx, dword [ebp - 0x20]
mov eax, dword [ebx]
mov eax, dword [eax + 0x28]
add eax, dword [edi + 0xc]
mov dword [edi + 0xc], eax
mov edx, dword [edi + 0x10]
cmp dword [esi + 0x10], edx
jb 0x487dad
mov ebx, dword [esi + 0xc]
mov dword [ebp - 0x1c], ebx
sub ebx, eax
mov dword [ebp - 0x24], ebx
dec edx
test ebx, edx
jne 0x487dad
mov edx, dword [esi + 4]
mov dword [ebp - 0x28], edx
mov edx, dword [edi + 4]
cmp eax, dword [ebp - 0x1c]
jae 0x487dad
mov ebx, dword [ebp - 0x28]
add ebx, dword [ebp - 0x24]
mov dword [esp], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov dword [ebp - 0x3c], ecx
call sub.msvcrt.dll_memcmp
test eax, eax
mov ecx, dword [ebp - 0x3c]
jne 0x487dad
mov dword [edi + 0x14], esi
mov dword [edi + 0x10], 0
mov edi, esi
mov esi, edi
jmp 0x487d43
mov ebx, dword [ebp - 0x2c]
mov dword [esp], ebx
call sub.msvcrt.dll_free
mov esi, dword [ebp - 0x34]
mov esi, dword [esi + 8]
mov dword [ebp - 0x1c], esi
mov eax, dword [esi + 0x20]
mov ebx, dword [eax + 0x18]
mov ecx, eax
xor edx, edx
test ecx, ecx
je 0x487e3f
mov esi, dword [ecx + 0x18]
cmp esi, ebx
je 0x487de2
mov ebx, dword [ebx + 4]
mov dword [ebx + 0x24], edx
mov ebx, esi
mov edi, dword [ecx + 0x10]
test edi, edi
je 0x487e01
cmp dword [esi + 0x10], 0
je 0x487ea0
lea edx, [edx + edi - 1]
neg edi
and edx, edi
mov dword [ecx + 0x14], edx
add edx, dword [ecx + 0xc]
mov ecx, dword [ecx + 0x1c]
jmp 0x487dcf
mov eax, 1
add esp, 0x5c
pop ebx
pop esi
pop edi
leave
ret
mov eax, dword [ecx + 4]
mov dword [eax + 0x24], edx
mov edx, dword [ebp - 0x34]
mov eax, dword [edx + 4]
test eax, eax
je 0x487c6b
cmp dword [eax + 0x10], 0
je 0x487e31
mov eax, dword [eax]
jmp 0x487e1f
mov edx, dword [eax + 4]
or dword [edx + 0x14], 0x208000
mov eax, dword [eax]
jmp 0x487e1f
mov ebx, dword [ebx + 4]
mov dword [ebx + 0x24], edx
mov ecx, dword [ebx + 0x3c]
test ecx, ecx
je 0x487e60
mov edi, 1
shl edi, cl
mov ecx, edi
lea edx, [edx + edi - 1]
neg ecx
and edx, ecx
mov dword [ebx + 0x24], edx
mov ebx, dword [ebp - 0x1c]
add ebx, 0x20
test eax, eax
je 0x487e19
cmp dword [eax + 0x10], 0
je 0x487e78
lea ebx, [eax + 0x1c]
mov eax, dword [eax + 0x1c]
jmp 0x487e66
mov edx, dword [eax + 0x1c]
mov dword [ebx], edx
mov esi, dword [eax + 0xc]
test esi, esi
je 0x487e73
mov ecx, dword [eax + 0x14]
mov edx, dword [ecx + 0x18]
mov dword [eax + 0x18], edx
mov edx, dword [ecx + 0x10]
mov dword [eax + 0x10], edx
mov edx, dword [ecx + 0xc]
add edx, dword [ecx + 0x14]
sub edx, esi
mov dword [eax + 0x14], edx
jmp 0x487e73
mov dword [esi + 0x10], ecx
xor edx, edx
jmp 0x487df3