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

Disassembly:
sub esp, 0x20
push ebx
mov ebx, dword [esp + 0x2c]
push ebp
push esi
push edi
mov edi, dword [esp + 0x34]
xor esi, esi
xor ebp, ebp
mov dword [esp + 0x10], ebp
cmp dword [edi + 0x3c], esi
je 0x52469e
mov esi, dword [ebx + 4]
mov dword [ebx + 4], ebp
movzx eax, word [edi + 0x72]
push eax
push ebx
push edi
call fcn.00525140
add esp, 0xc
mov dword [ebx + 4], esi
test eax, eax
jne 0x524ad3
jmp 0x5246c6
mov dword [ebx], 0xffffffff
movzx eax, word [edi + 0x72]
push eax
push ebx
push edi
call fcn.00525140
add esp, 0xc
mov dword [ebx], esi
test eax, eax
je 0x52474e
cmp dword [edi + 0x50], esi
je 0x524ad3
movzx eax, word [edi + 0x7e]
dec eax
lea ecx, [eax*8]
mov dword [esp + 0x34], eax
mov eax, dword [edi + 0x78]
mov dword [esp + 0x20], ecx
push dword [eax + ecx]
push edi
call fcn.005216a0
mov esi, eax
add esp, 8
test esi, esi
je 0x524ad3
mov eax, dword [esp + 0x20]
mov ecx, dword [edi + 0x78]
movsx ecx, word [ecx + eax + 4]
movzx ecx, word [esi + ecx*2 + 0x1a]
mov eax, dword [ecx + esi + 0x18]
mov dword [esp + 0x20], eax
test eax, eax
je 0x524757
push esi
push edi
call fcn.00521910
push dword [esp + 0x28]
push edi
call fcn.005211c0
mov esi, eax
add esp, 0x10
test esi, esi
je 0x524ad3
movzx ecx, word [edi + 0x7e]
mov eax, dword [edi + 0x78]
dec ecx
mov dword [esp + 0x34], ecx
lea ecx, [eax + ecx*8]
movzx eax, word [ecx + 4]
cmp ax, word [esi + 0xc]
jge 0x524757
inc eax
mov word [ecx + 4], ax
jmp 0x524757
movzx eax, word [edi + 0x7e]
dec eax
mov dword [esp + 0x34], eax
mov eax, dword [edi + 0x84]
movzx ecx, word [edi + 0x72]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x18], eax
test eax, eax
jne 0x52478b
lea eax, [ecx + 0xc]
push eax
call fcn.004a67c0
mov ecx, dword [esp + 0x24]
add esp, 4
mov dword [esp + 0x18], eax
mov byte [eax + ecx + 8], 0
mov dword [eax + 4], ebp
mov dword [eax], ebp
inc ecx
add eax, 8
push ecx
lea ecx, [ebx + 8]
push ecx
push eax
call fcn.0059ce60
mov ecx, dword [esp + 0x24]
add esp, 0xc
mov eax, dword [ebx]
mov dword [ecx], eax
mov eax, dword [ebx + 4]
mov dword [ecx + 4], eax
mov dword [edi + 0x84], ecx
cmp dword [esp + 0x34], ebp
jl 0x5249f5
mov ebp, dword [esp + 0x34]
nop
test ebx, ebx
je 0x5249f1
test esi, esi
je 0x5247d6
push esi
push edi
call fcn.00521910
add esp, 8
mov eax, dword [edi + 0x78]
lea ecx, [ebp*8]
mov dword [esp + 0x20], ecx
push dword [eax + ecx]
push edi
call fcn.005216a0
mov esi, eax
add esp, 8
test esi, esi
je 0x524abc
mov eax, dword [edi + 0x78]
movzx ecx, word [eax + ebp*8 + 4]
lea edx, [eax + ebp*8]
mov eax, ecx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov ax, word [esi + 0xc]
cmp ax, word [edi + 0x76]
jae 0x524838
lea eax, [ebx + 8]
push eax
push dword [ebx + 4]
push dword [ebx]
push ecx
push esi
push edi
call fcn.005215b0
add esp, 0x18
xor ebx, ebx
jmp 0x5249e4
xor eax, eax
mov word [edi + 0x7e], ax
test ebp, ebp
je 0x5249be
push dword [edx - 8]
push edi
call fcn.005216a0
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x524a97
mov eax, dword [esp + 0x20]
mov ecx, dword [edi + 0x78]
movzx ecx, word [ecx + eax - 4]
mov eax, ecx
mov edx, ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], eax
cmp cx, word [ebp + 0xc]
jae 0x52489a
movzx eax, word [ebp + eax*2 + 0x1c]
cmp dword [eax + ebp + 0x18], 0
je 0x524896
lea eax, [ecx + 1]
movzx eax, ax
mov dword [esp + 0x14], eax
jmp 0x5248c1
mov eax, dword [esp + 0x20]
test cx, cx
je 0x5249ba
movzx eax, word [ebp + eax*2 + 0x18]
cmp dword [eax + ebp + 0x18], 0
je 0x5249ba
lea eax, [ecx - 1]
movzx edx, ax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x1c], edx
cmp dx, ax
je 0x5249ba
cmp dx, cx
jne 0x524900
mov eax, dword [esp + 0x14]
movzx eax, ax
mov dword [esp + 0x18], esi
movzx eax, word [ebp + eax*2 + 0x1a]
push dword [eax + ebp + 0x18]
push edi
call fcn.005216a0
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
je 0x524a6b
mov ecx, dword [esp + 0x24]
mov edx, esi
jmp 0x524934
movzx eax, dx
mov dword [esp + 0x14], esi
movzx eax, word [ebp + eax*2 + 0x1a]
push dword [eax + ebp + 0x18]
push edi
call fcn.005216a0
mov edx, eax
add esp, 8
mov dword [esp + 0x18], edx
test edx, edx
je 0x524a6b
mov cx, word [edx + 0xc]
mov eax, esi
inc cx
add cx, word [esp + 0x28]
movzx ecx, cx
mov dword [esp + 0x20], ecx
movzx ecx, word [eax + 0xc]
movzx eax, word [edx + 0xc]
add ecx, eax
movzx eax, word [edi + 0x76]
lea eax, [eax*2 - 2]
cmp ecx, eax
jg 0x52499c
push dword [esp + 0x14]
push edx
push dword [esp + 0x24]
push ebp
push edi
call fcn.0051dc60
mov eax, dword [esp + 0x2c]
add esp, 0x14
mov ecx, dword [esp + 0x20]
movzx edx, word [eax + 0xc]
cmp dx, cx
jae 0x52497f
mov eax, dword [esp + 0x14]
sub ecx, edx
dec ecx
lea edx, [ebx + 8]
movzx ecx, cx
push edx
push dword [ebx + 4]
push dword [ebx]
push ecx
push eax
push edi
call fcn.005215b0
mov edx, dword [esp + 0x30]
add esp, 0x18
xor ebx, ebx
mov eax, dword [esp + 0x14]
cmp edx, esi
cmovne eax, edx
push eax
push edi
call fcn.00521910
push ebp
push edi
call fcn.00521910
add esp, 0x10
test ebx, ebx
je 0x5249f1
mov ebp, dword [esp + 0x34]
push dword [esp + 0x2c]
push ebx
push esi
push edi
call fcn.00521a00
mov ebx, eax
add esp, 0x10
mov eax, dword [esp + 0x10]
test eax, eax
je 0x5249e0
push eax
call fcn.004a6790
add esp, 4
mov dword [esp + 0x10], ebx
sub ebp, 1
mov dword [esp + 0x34], ebp
jns 0x5247c0
mov ebp, dword [esp + 0x10]
push esi
push edi
call fcn.00521910
add esp, 8
test ebx, ebx
je 0x524a51
push 0
push edi
call fcn.00521890
mov esi, eax
add esp, 8
test esi, esi
je 0x524ad3
lea eax, [ebx + 8]
push eax
push dword [ebx + 4]
push dword [ebx]
push 0
push esi
push edi
call fcn.005215b0
movzx ecx, word [esi + 0x1c]
mov eax, dword [edi + 0x68]
push esi
push edi
mov dword [ecx + esi + 0x18], eax
mov eax, dword [esi]
mov dword [edi + 0x68], eax
mov dword [edi + 0x58], 1
call fcn.00521910
add esp, 0x20
xor eax, eax
mov word [edi + 0x7e], ax
test ebp, ebp
je 0x524a5e
push ebp
call fcn.004a6790
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x20
ret
push esi
push edi
call fcn.00521910
push ebp
push edi
call fcn.00521910
mov ebp, dword [esp + 0x20]
add esp, 0x10
test ebp, ebp
je 0x524ad3
push ebp
call fcn.004a6790
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
push esi
push edi
call fcn.00521910
mov ebp, dword [esp + 0x18]
add esp, 8
test ebp, ebp
je 0x524ad3
push ebp
call fcn.004a6790
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
mov ebp, dword [esp + 0x10]
test ebp, ebp
je 0x524acd
push ebp
call fcn.004a6790
add esp, 4
xor eax, eax
mov word [edi + 0x7e], ax
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x20
ret