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

Disassembly:
sub esp, 0x60
mov eax, dword [0x58cb30]
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 ebx, ebx
mov ecx, dword [esp + 0x80]
mov dword [esp + 0x1c], eax
lea eax, [esi + 0x6486b8]
mov dword [esp + 0x10], eax
lea ebp, [esi + 0x64b838]
mov edx, edi
cmp ecx, 1
jne 0x522386
push eax
lea ecx, [esi + 0x64a738]
mov dword [esi + 0x64b850], ebx
mov dword [esi + 0x64b854], ebx
call fcn.0048f250
mov eax, dword [esi + 0x64b7f4]
mov edx, edi
mov ecx, dword [ebp + 4]
mov dword [esi + 0x64b7f0], eax
mov eax, dword [ebp]
mov dword [esi + 0x64b834], ecx
mov ecx, dword [esp + 0x80]
mov dword [esi + 0x64b830], eax
jmp 0x52238a
mov dword [esp + 0x10], eax
mov eax, dword [esi + 0x64b848]
or eax, dword [esi + 0x64b84c]
mov dword [esp + 0x14], ebx
je 0x5223d4
mov eax, dword [esi + 0x64b848]
sub eax, dword [ebp]
mov ebx, dword [esi + 0x64b84c]
sbb ebx, dword [ebp + 4]
cmp dword [esp + 0x14], ebx
mov ebx, 0
jb 0x5223d4
ja 0x5223bf
cmp edi, eax
jbe 0x5223d4
cmp ecx, 3
je 0x5223d2
cmp ecx, 1
je 0x5223d2
cmp ecx, 2
je 0x5223d2
mov edx, eax
jmp 0x52241c
xor edx, edx
cmp ecx, 2
jne 0x52241c
cmp dword [esi + 0x64b7f8], 0xffffffff
jne 0x522400
mov eax, dword [esi + 0x64b7f4]
mov ecx, dword [ebp + 4]
mov dword [esi + 0x64b7f8], eax
mov eax, dword [ebp]
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 + str.Hfv], 0
test edx, edx
je 0x522455
mov ecx, dword [esp + 0x10]
mov ebx, edx
imul ebx, dword [esp + 0x78]
push ebx
push dword [esp + 0x20]
call fcn.00490400
add dword [ebp], ebx
adc dword [ebp + 4], 0
cmp dword [esp + 0x80], 0
jne 0x522453
add dword [esi + 0x64b850], ebx
adc dword [esi + 0x64b854], 0
sub edi, ebx
mov dword [esp + 0x14], edi
test edi, edi
je 0x522778
mov ecx, dword [esi + 0x64b840]
test ecx, ecx
je 0x522778
mov eax, dword [esi + 0x64b7f4]
cmp ecx, 1
jne 0x522490
cmp dword [esi + 0x64b7f0], eax
jne 0x522490
mov eax, dword [esi + 0x64b7b0]
mov dword [esi + 0x64b828], eax
jmp 0x5224ba
push dword [esi + 0x64b7b0]
mov ecx, esi
push dword [esp + 0x14]
push eax
call fcn.005228c0
push dword [esi + 0x64b7b0]
call fcn.0053867f
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 [ebp], 0
mov dword [ebp + 4], 0
call fcn.00522ab0
push 0
mov edi, eax
push edi
push 0
push 0
call fcn.004c13b0
xor eax, eax
mov dword [esp + 0x24], 0x558718
lea ecx, [esp + 0x20]
mov dword [esp + 0x28], 0x558718
mov dword [esp + 0x2c], 0x558718
mov dword [esp + 0x30], 0x558718
mov dword [esp + 0x34], 0x558718
mov dword [esp + 0x38], 0x558718
mov dword [esp + 0x3c], 0x558718
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.004bf7b0
push edi
call fcn.0053867f
mov eax, dword [0x5b450c]
add esp, 4
mov edx, dword [0x5b4508]
sub eax, edx
mov ecx, dword [esi + 0x64b7f4]
sar eax, 3
cmp ecx, eax
jae 0x5225c2
mov eax, dword [edx + ecx*8]
mov edx, dword [edx + ecx*8 + 4]
test edx, edx
jl 0x5225af
jg 0x5225b6
cmp eax, 0x400
ja 0x5225b6
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 0x5225e7
push ecx
mov ecx, esi
call fcn.00521550
test eax, eax
jne 0x5225e7
push 9
mov ecx, esi
call fcn.00524630
mov ecx, 0x5a4ee8
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x5225f0
sub ecx, edx
sar ecx, 1
lea eax, [ecx + 0x1e]
mov dword [esp + 0x18], eax
add eax, eax
push eax
call fcn.005398b8
mov edi, eax
add esp, 4
test edi, edi
jne 0x52261f
mov dword [esi + 0x64b7b0], eax
jmp 0x52266d
mov ecx, 0x5a4ee8
mov edx, edi
sub edx, ecx
jmp 0x522630
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x522630
push dword [esp + 0x18]
push edi
call fcn.004a1860
push dword [esp + 0x18]
push str.__rzi_
push edi
call fcn.004bda80
push dword [esp + 0x18]
push edi
call fcn.00491c60
mov dword [esi + 0x64b7b0], eax
test eax, eax
jne 0x522676
push 4
mov ecx, esi
call fcn.00524630
mov ecx, dword [esp + 0x10]
push 0x11
push dword [esi + 0x64b7b0]
call fcn.0048f5a0
test al, al
jne 0x5226a4
push dword [esi + 0x64b7b0]
mov ecx, 0x5d381c
call fcn.00487b90
push 0xa
mov ecx, esi
call fcn.00524630
mov eax, dword [esp + 0x1c]
mov edi, dword [esp + 0x14]
add eax, ebx
mov ecx, dword [esp + 0x10]
push edi
push eax
call fcn.00490400
mov eax, dword [esp + 0x80]
add ebx, edi
add dword [ebp], edi
adc dword [ebp + 4], 0
cmp eax, 3
je 0x5226ea
cmp eax, 1
je 0x5226ea
cmp eax, 2
je 0x5226ea
add dword [esi + 0x64b850], edi
adc dword [esi + 0x64b854], 0
jmp 0x522778
cmp dword [esi + 0x64b840], 1
jne 0x52273d
mov eax, dword [esi + 0x64a738]
lea ebp, [esi + 0x64a738]
mov edi, dword [eax + 0x18]
mov ecx, edi
call dword [0x55770c]
mov ecx, ebp
call edi
test al, al
je 0x52273d
mov eax, dword [esi + 0x64b7f0]
cmp eax, dword [esi + 0x64b7f4]
je 0x52273d
push dword [esi + 0x64b828]
mov ecx, esi
push ebp
push eax
call fcn.005228c0
push dword [esi + 0x64b828]
call fcn.0053867f
add esp, 4
mov eax, dword [esi + 0x64b7b0]
lea ecx, [esi + 0x64a738]
push dword [esp + 0x10]
mov dword [esi + 0x64b828], eax
call fcn.0048f250
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, ebx
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00530218
add esp, 0x60
ret 0x10