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

Disassembly:
sub esp, 0x60
mov eax, dword [0x58bb30]
xor eax, esp
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x64]
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x78]
mov esi, ecx
imul edi, dword [esp + 0x7c]
xor ebp, ebp
mov ecx, dword [esp + 0x80]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], ebp
lea ebx, [esi + 0x64b838]
mov dword [esp + 0x14], ebx
mov edx, edi
cmp ecx, 1
jne 0x521839
lea eax, [esi + 0x6486b8]
mov dword [esi + 0x64b850], ebp
push eax
lea ecx, [esi + 0x64a738]
mov dword [esi + 0x64b854], ebp
call fcn.0048eb50
mov eax, dword [esi + 0x64b7f4]
mov edx, edi
mov ecx, dword [ebx + 4]
mov dword [esi + 0x64b7f0], eax
mov eax, dword [ebx]
mov dword [esi + 0x64b834], ecx
mov ecx, dword [esp + 0x80]
mov dword [esi + 0x64b830], eax
jmp 0x52183d
mov dword [esp + 0x14], ebx
mov eax, dword [esi + 0x64b848]
or eax, dword [esi + 0x64b84c]
mov dword [esp + 0x10], ebp
je 0x521886
mov eax, dword [esi + 0x64b848]
sub eax, dword [ebx]
mov ebp, dword [esi + 0x64b84c]
sbb ebp, dword [ebx + 4]
cmp dword [esp + 0x10], ebp
mov ebp, 0
jb 0x521886
ja 0x521871
cmp edi, eax
jbe 0x521886
cmp ecx, 3
je 0x521884
cmp ecx, 1
je 0x521884
cmp ecx, 2
je 0x521884
mov edx, eax
jmp 0x5218cd
xor edx, edx
cmp ecx, 2
jne 0x5218cd
cmp dword [esi + 0x64b7f8], 0xffffffff
jne 0x5218b1
mov eax, dword [esi + 0x64b7f4]
mov ecx, dword [ebx + 4]
mov dword [esi + 0x64b7f8], eax
mov eax, dword [ebx]
mov dword [esi + 0x64b800], eax
mov dword [esi + 0x64b804], ecx
add dword [esi + 0x64b808], 1
adc dword [esi + 0x64b80c], 0
add dword [esi + 0x64b810], 1
adc dword [esi + 0x64b814], 0
test edx, edx
je 0x52190b
mov ebp, edx
lea ecx, [esi + 0x6486b8]
imul ebp, dword [esp + 0x78]
push ebp
push dword [esp + 0x20]
mov dword [esp + 0x20], ebp
call fcn.0048fd00
add dword [ebx], ebp
adc dword [ebx + 4], 0
cmp dword [esp + 0x80], 0
jne 0x521909
add dword [esi + 0x64b850], ebp
adc dword [esi + 0x64b854], 0
sub edi, ebp
mov dword [esp + 0x10], edi
test edi, edi
je 0x521c59
mov ecx, dword [esi + 0x64b840]
test ecx, ecx
je 0x521c59
mov eax, dword [esi + 0x64b7f4]
cmp ecx, 1
jne 0x521946
cmp dword [esi + 0x64b7f0], eax
jne 0x521946
mov eax, dword [esi + 0x64b7b0]
mov dword [esi + 0x64b828], eax
jmp 0x52199a
mov ebp, dword [esi + 0x64b7b0]
mov ecx, esi
push eax
push dword [esi + 0x64b7d4]
call fcn.00521f90
mov ebx, eax
mov eax, dword [esi + 0x6486b8]
mov edi, dword [eax + 8]
mov ecx, edi
call dword [0x55670c]
lea ecx, [esi + 0x6486b8]
call edi
push ebx
push ebp
mov ecx, esi
call fcn.00523ab0
push dword [esi + 0x64b7b0]
call fcn.00537b6f
mov ebx, dword [esp + 0x18]
add esp, 4
mov dword [esi + 0x64b7b0], 0
push dword [esi + 0x64b7f4]
mov ecx, esi
mov dword [esi + 0x64b808], 0
push dword [esi + 0x64b7d4]
mov dword [esi + 0x64b80c], 0
mov dword [ebx], 0
mov dword [ebx + 4], 0
call fcn.00521f90
push 0
mov edi, eax
push edi
push 0
push 0
call fcn.004c0970
xor eax, eax
mov dword [esp + 0x24], 0x557718
lea ecx, [esp + 0x20]
mov dword [esp + 0x28], 0x557718
mov dword [esp + 0x2c], 0x557718
mov dword [esp + 0x30], 0x557718
mov dword [esp + 0x34], 0x557718
mov dword [esp + 0x38], 0x557718
mov dword [esp + 0x3c], 0x557718
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], 0x97
mov dword [esp + 0x20], edi
mov dword [esp + 0x60], 1
call fcn.004bed70
push edi
call fcn.00537b6f
mov eax, dword [0x5b350c]
add esp, 4
mov edx, dword [0x5b3508]
sub eax, edx
mov ecx, dword [esi + 0x64b7f4]
sar eax, 3
cmp ecx, eax
jae 0x521aa1
mov eax, dword [edx + ecx*8]
mov edx, dword [edx + ecx*8 + 4]
test edx, edx
jl 0x521a8e
jg 0x521a95
cmp eax, 0x400
ja 0x521a95
mov eax, 0x400
xor edx, edx
mov dword [esi + 0x64b848], eax
mov dword [esi + 0x64b84c], edx
inc ecx
cmp dword [esi + 0x64b840], 2
mov dword [esi + 0x64b7f4], ecx
jne 0x521ac6
push ecx
mov ecx, esi
call fcn.00520a00
test eax, eax
jne 0x521ac6
push 9
mov ecx, esi
call fcn.00523b10
mov ecx, 0x5a3ee8
lea edx, [ecx + 2]
mov edi, edi
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x521ad0
sub ecx, edx
sar ecx, 1
lea ebp, [ecx + 0x1e]
lea eax, [ebp*2]
push eax
call fcn.00538da8
mov edi, eax
add esp, 4
test edi, edi
jne 0x521b00
mov dword [esi + 0x64b7b0], eax
jmp 0x521b44
mov ecx, 0x5a3ee8
mov edx, edi
sub edx, ecx
lea esp, [esp]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x521b10
push ebp
push edi
call fcn.004a0eb0
push ebp
push str.__rzi_
push edi
call fcn.004bd030
push ebp
push edi
call fcn.004912c0
mov dword [esi + 0x64b7b0], eax
test eax, eax
jne 0x521b4d
push 4
mov ecx, esi
call fcn.00523b10
push 0x11
push dword [esi + 0x64b7b0]
lea ecx, [esi + 0x6486b8]
call fcn.0048eea0
test al, al
jne 0x521b7d
push dword [esi + 0x64b7b0]
mov ecx, 0x5d281c
call fcn.00487390
push 0xa
mov ecx, esi
call fcn.00523b10
mov eax, dword [esp + 0x1c]
lea ecx, [esi + 0x6486b8]
mov edi, dword [esp + 0x10]
mov ebp, dword [esp + 0x18]
add eax, ebp
push edi
push eax
call fcn.0048fd00
mov eax, dword [esp + 0x80]
add ebp, edi
add dword [ebx], edi
adc dword [ebx + 4], 0
cmp eax, 3
je 0x521bc8
cmp eax, 1
je 0x521bc8
cmp eax, 2
je 0x521bc8
add dword [esi + 0x64b850], edi
adc dword [esi + 0x64b854], 0
jmp 0x521c59
cmp dword [esi + 0x64b840], 1
jne 0x521c1b
mov eax, dword [esi + 0x64a738]
lea ebx, [esi + 0x64a738]
mov edi, dword [eax + 0x18]
mov ecx, edi
call dword [0x55670c]
mov ecx, ebx
call edi
test al, al
je 0x521c1b
mov eax, dword [esi + 0x64b7f0]
cmp eax, dword [esi + 0x64b7f4]
je 0x521c1b
push dword [esi + 0x64b828]
mov ecx, esi
push ebx
push eax
call fcn.00521da0
push dword [esi + 0x64b828]
call fcn.00537b6f
add esp, 4
mov eax, dword [esi + 0x64b7b0]
lea ecx, [esi + 0x64a738]
mov dword [esi + 0x64b828], eax
lea eax, [esi + 0x6486b8]
push eax
call fcn.0048eb50
mov eax, dword [esi + 0x64b7f4]
mov dword [esi + 0x64b830], 0
mov dword [esi + 0x64b834], 0
mov dword [esi + 0x64b7f0], eax
mov ecx, dword [esp + 0x6c]
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0052f708
add esp, 0x60
ret 0x10