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

Disassembly:
sub esp, 0xcc
mov eax, dword [0x58f140]
xor eax, esp
mov dword [esp + 0xc8], eax
mov eax, dword [esp + 0xd0]
mov ecx, dword [esp + 0xd4]
push ebx
mov ebx, dword [esp + 0xdc]
mov dword [esp + 0xc], eax
mov eax, dword [eax]
push esi
push edi
xor edi, edi
mov dword [esp + 0x20], ecx
mov edx, dword [eax]
xor ecx, ecx
mov dword [esp + 0x28], edi
mov edi, dword [esp + 0x14]
mov dword [esp + 0x10], ebx
mov eax, dword [edx]
mov dword [esp + 0x44], edx
mov esi, dword [edi + 8]
mov dword [esp + 0x34], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x24], ecx
mov dword [esp + 0x64], esi
cmp dword [edx + 0x24], ecx
je 0x521a75
mov eax, dword [edx + 0xc]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xc8]
xor ecx, esp
call fcn.0052df19
add esp, 0xcc
ret
movzx ecx, word [esi + 0x1a]
mov edx, 0x18
mov eax, dword [esi + 0x2c]
test al, 0x20
mov dword [esp + 0x50], ecx
movzx ecx, word [esi + 0x1c]
mov dword [esp + 0x54], ecx
movzx ecx, word [esi + 0x32]
mov dword [esp + 0x60], ecx
movzx ecx, word [esi + 0x30]
mov dword [esp + 0x58], ecx
movzx ecx, cx
mov dword [esp + 0x5c], ecx
mov ecx, dword [esi]
mov dword [esp + 0x48], ecx
mov ecx, dword [esi + 4]
mov dword [esp + 0x4c], ecx
movzx ecx, word [esi + 0x16]
mov dword [esp + 0x40], eax
mov eax, 0x1bf
cmove edx, eax
mov dword [esp + 0x38], ecx
movzx eax, word [esi + 0x18]
movzx ecx, cx
mov dword [esp + 0x6c], ecx
mov ecx, edx
push ebp
and ecx, 0xffffffc3
movzx ebp, ax
test byte [ebx + 0x38], 4
push ebx
mov dword [esp + 0x44], eax
cmove ecx, edx
mov eax, dword [esp + 0x28]
push ecx
push ebp
mov dword [esp + 0x2c], ebp
push dword [eax + 0x2c]
lea eax, [esp + 0x88]
push dword [edi + 4]
push eax
call fcn.00525390
mov ebp, eax
add esp, 0x18
xor eax, eax
mov word [esi + 0x12], ax
mov ecx, dword [ebx + 8]
movzx ecx, word [ecx]
mov eax, ecx
mov dword [esp + 0x6c], eax
cmp ax, 0xa
jg 0x521b2b
mov dword [esp + 0x34], 0
jmp 0x521b44
movsx eax, cx
cdq
push edx
push eax
call fcn.004e8540
add esp, 8
sub ax, 0x21
movzx eax, ax
mov dword [esp + 0x34], eax
test ebp, ebp
je 0x522148
movzx edx, word [ebp + 0xc]
xor eax, eax
mov ecx, edx
mov dword [esp + 0x10], eax
mov eax, 0x100
mov dword [esp + 0x30], ecx
cmp cx, ax
je 0x521b6c
test byte [ebp + 0xa], 0x80
je 0x521b9c
mov eax, dword [ebx + 4]
mov ecx, dword [esp + 0x20]
movsx ecx, word [eax + ecx*2]
test ecx, ecx
js 0x521b93
mov eax, dword [ebx + 0xc]
add ecx, ecx
mov eax, dword [eax + 4]
test dword [eax + ecx*8 + 4], 0xf
jne 0x52212e
jmp 0x521b9c
cmp ecx, 0xffffffff
je 0x52212e
mov ecx, dword [ebp + 0x20]
mov eax, dword [ebp + 0x24]
and ecx, dword [esi + 8]
and eax, dword [esi + 0xc]
or ecx, eax
jne 0x52212e
mov eax, 0x100
test word [ebp + 0xa], ax
je 0x521bc4
cmp edx, 0x10
je 0x52212e
mov eax, dword [esp + 0x24]
mov cl, byte [eax + 0x24]
test cl, 0x58
je 0x521c01
mov eax, dword [ebp]
mov edx, dword [eax + 4]
test dl, 3
je 0x52212e
mov edi, dword [esp + 0x24]
mov eax, dword [eax + 0x24]
cmp eax, dword [edi + 0x2c]
mov edi, dword [esp + 0x18]
jne 0x52212e
test cl, 0x18
je 0x521c01
test dl, 2
jne 0x52212e
cmp byte [ebx + 0x36], 0
je 0x521c18
movzx eax, word [ebx + 0x32]
dec eax
cmp dword [esp + 0x20], eax
jne 0x521c18
or byte [edi + 0x10], 2
jmp 0x521c1c
or byte [edi + 0x10], 1
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x60]
mov dword [esi + 0x2c], eax
mov eax, dword [esp + 0x40]
mov word [esi + 0x18], ax
mov eax, dword [esp + 0x54]
mov word [esi + 0x1a], ax
mov eax, dword [esp + 0x58]
mov word [esi + 0x1c], ax
mov eax, dword [esp + 0x5c]
mov word [esi + 0x30], ax
cmp cx, word [esi + 0x34]
jb 0x521c67
movzx eax, ax
inc eax
push eax
push esi
push dword [esp + 0x40]
call fcn.005238c0
add esp, 0xc
test eax, eax
jne 0x522148
movzx ecx, word [esi + 0x30]
mov eax, dword [esi + 0x38]
mov edi, dword [esp + 0x4c]
mov dword [eax + ecx*4], ebp
mov ax, word [esi + 0x30]
mov ecx, dword [esi + 8]
inc ax
mov word [esi + 0x30], ax
not ecx
mov edx, dword [ebp + 0x24]
or edi, dword [ebp + 0x20]
or edx, dword [esp + 0x50]
and edi, ecx
movzx ebx, ax
mov eax, dword [esi + 0xc]
not eax
mov dword [esi], edi
and edx, eax
mov eax, dword [esp + 0x30]
mov dword [esi + 4], edx
test al, 1
je 0x521dac
mov edx, dword [ebp]
test dword [edx + 4], 0x1000
je 0x521d2b
lea edi, [ebx - 1]
mov eax, 0x2e
xor ecx, ecx
mov dword [esp + 0x10], eax
test edi, edi
jle 0x521d4c
mov ebx, dword [esi + 0x38]
mov esi, eax
mov eax, dword [ebx + ecx*4]
test eax, eax
je 0x521ce8
cmp dword [eax], edx
mov dword [esp + 0x10], 0
cmove esi, dword [esp + 0x10]
inc ecx
cmp ecx, edi
jl 0x521cd2
mov dword [esp + 0x10], esi
mov esi, dword [esp + 0x68]
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
test byte [eax + 0x38], 0x80
je 0x521d9c
cmp word [esp + 0x34], 0xa
jl 0x521d9c
mov eax, dword [eax + 8]
mov edx, dword [esp + 0x20]
movzx edi, cx
movzx ebx, word [eax + edx*2]
cmp di, 0xa
jg 0x521d50
xor eax, eax
jmp 0x521d65
mov eax, dword [edx + 0x14]
test eax, eax
je 0x521cf5
mov eax, dword [eax]
test eax, eax
je 0x521cf5
cdq
push edx
push eax
call fcn.004e8540
movsx ecx, ax
add esp, 8
mov dword [esp + 0x10], ecx
jmp 0x521cf9
mov ecx, eax
jmp 0x521cf9
movsx eax, di
cdq
push edx
push eax
call fcn.004e8540
add esp, 8
sub ax, 0x21
movzx eax, ax
sub eax, edi
sub eax, dword [esp + 0x34]
add eax, 0xa
add eax, ebx
test ax, ax
jns 0x521d9c
cmp word [esp + 0xec], 2
jge 0x522126
mov eax, dword [esp + 0x38]
test dword [eax + 0x50], 0x20000
jne 0x522126
or dword [esi + 0x2c], 0x100000
or dword [esi + 0x2c], 4
mov edx, dword [esi + 0x2c]
mov ebx, dword [esp + 0x14]
jmp 0x521f02
mov ebx, dword [esp + 0x14]
test al, 0x82
je 0x521e43
mov eax, dword [ebx + 4]
mov ecx, dword [esp + 0x20]
movsx eax, word [eax + ecx*2]
mov ecx, dword [esi + 0x2c]
or ecx, 1
mov dword [esi + 0x2c], ecx
cmp eax, 0xffffffff
je 0x521e18
mov edi, ecx
mov edx, ecx
test eax, eax
js 0x521e25
cmp word [esp + 0xec], 0
jne 0x521e25
movzx eax, word [ebx + 0x32]
mov ebx, eax
dec eax
cmp dword [esp + 0x20], eax
jne 0x521e25
mov eax, dword [esp + 0x14]
test byte [eax + 0x38], 8
jne 0x521e18
cmp ebx, 1
jne 0x521e0e
cmp byte [eax + 0x36], 0
je 0x521e0e
cmp word [esp + 0x30], 2
je 0x521e18
mov edx, ecx
or edx, 0x10000
jmp 0x521e20
mov edx, ecx
or edx, 0x1000
mov edi, edx
mov dword [esi + 0x2c], edx
cmp byte [esp + 0x91], 1
jbe 0x521e3a
mov edx, edi
or edx, 0x200000
mov dword [esi + 0x2c], edx
mov ebx, dword [esp + 0x14]
jmp 0x521f02
test eax, 0x100
je 0x521e58
mov edx, dword [esi + 0x2c]
or edx, 8
mov dword [esi + 0x2c], edx
jmp 0x521f02
mov eax, dword [esp + 0x24]
push ebp
push dword [esp + 0x24]
push ebx
push dword [eax + 0x2c]
push dword [esp + 0x58]
call fcn.00525120
mov edx, dword [esi + 0x2c]
add esp, 0x14
test byte [esp + 0x30], 0x24
je 0x521edc
or edx, 0x22
mov word [esi + 0x1a], ax
xor edi, edi
mov dword [esi + 0x2c], edx
mov eax, 0x100
mov dword [esp + 0x28], ebp
mov dword [esp + 0x2c], edi
test word [ebp + 0xa], ax
je 0x521f02
movzx eax, word [esi + 0x30]
lea edi, [ebp + 0x30]
inc eax
mov dword [esp + 0x2c], edi
push eax
push esi
push dword [esp + 0x40]
call fcn.005238c0
add esp, 0xc
test eax, eax
jne 0x522148
movzx ecx, word [esi + 0x30]
mov eax, dword [esi + 0x38]
mov dword [eax + ecx*4], edi
mov eax, 1
inc word [esi + 0x30]
or dword [esi + 0x2c], 0x10
mov edx, dword [esi + 0x2c]
mov word [esi + 0x1c], ax
jmp 0x521f02
or edx, 0x12
mov word [esi + 0x1c], ax
mov dword [esi + 0x2c], edx
mov dword [esp + 0x2c], ebp
test dl, 0x20
je 0x521efc
movzx ecx, word [esi + 0x30]
mov eax, dword [esi + 0x38]
mov ecx, dword [eax + ecx*4 - 8]
jmp 0x521efe
xor ecx, ecx
mov dword [esp + 0x28], ecx
test dl, 2
je 0x521fa0
movzx eax, word [esi + 0x16]
mov ebp, dword [esp + 0x28]
movsx edi, ax
test ebp, ebp
je 0x521f30
movzx ecx, word [ebp + 8]
test cx, cx
jg 0x521f27
add eax, ecx
jmp 0x521f30
test byte [ebp + 0xa], 0x80
jne 0x521f30
sub eax, 0x14
mov ebx, dword [esp + 0x2c]
movzx ecx, ax
test ebx, ebx
je 0x521f54
movzx edx, word [ebx + 8]
test dx, dx
jg 0x521f48
add eax, edx
jmp 0x521f51
test byte [ebx + 0xa], 0x80
jne 0x521f54
add eax, 0xffffffec
movzx ecx, ax
movzx edx, cx
test ebp, ebp
je 0x521f73
cmp word [ebp + 8], 0
jle 0x521f73
test ebx, ebx
je 0x521f73
cmp word [ebx + 8], 0
jle 0x521f73
lea eax, [ecx - 0x14]
movzx edx, ax
xor ecx, ecx
test ebp, ebp
setne cl
xor eax, eax
test ebx, ebx
setne al
add ecx, eax
mov eax, 0xa
sub edi, ecx
cmp dx, 0xa
cmovl edx, eax
movzx eax, dx
cmp eax, edi
cmovl edi, eax
movzx eax, di
mov edi, eax
jmp 0x521fff
inc word [esi + 0x18]
movzx ecx, word [ebp + 8]
movzx edx, word [esi + 0x18]
test cx, cx
jg 0x521fd4
mov eax, dword [ebx + 4]
mov ebp, dword [esp + 0x20]
cmp word [eax + ebp*2], 0
jl 0x521fd4
mov ebp, dword [esp + 0x10]
sub ecx, ebp
add cx, word [esi + 0x16]
movzx eax, cx
mov word [esi + 0x16], ax
mov edi, eax
jmp 0x522007
mov eax, dword [ebx + 8]
mov cx, word [eax + edx*2]
sub cx, word [eax + edx*2 - 2]
add cx, word [esi + 0x16]
test dword [esp + 0x30], 0x100
movzx eax, cx
mov ecx, eax
mov word [esi + 0x16], ax
mov edi, eax
je 0x522003
lea eax, [ecx + 0xa]
movzx edi, ax
mov word [esi + 0x16], ax
mov ebp, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
lea eax, [edi + 0x10]
movzx ebx, ax
mov eax, dword [ecx + 0x38]
and eax, 3
cmp al, 3
jne 0x52201f
mov eax, ebx
jmp 0x52203e
movsx ecx, word [ecx + 0x30]
mov eax, ecx
shl eax, 4
sub eax, ecx
mov ecx, dword [esp + 0x24]
cdq
mov ecx, dword [ecx + 0x10]
movsx ecx, word [ecx + 0x28]
idiv ecx
inc eax
add eax, edi
movzx eax, ax
push eax
push dword [esp + 0x38]
mov ecx, ebx
movzx ebx, cx
call fcn.004e85e0
add esp, 8
movzx edx, ax
test dword [esi + 0x2c], 0x4000140
jne 0x522069
push ebx
push eax
call fcn.004e85e0
add esp, 8
movzx edx, ax
push dword [esp + 0x6c]
mov ebx, dword [esp + 0x1c]
movzx ecx, bp
push esi
lea eax, [edx + ecx]
add eax, dword [esp + 0xf4]
mov word [esi + 0x14], ax
lea eax, [edi + ecx]
add eax, dword [esp + 0xf4]
mov word [esi + 0x16], ax
push dword [ebx + 4]
call fcn.00523670
push esi
push ebx
call fcn.005233c0
mov edx, dword [esi + 0x2c]
add esp, 0x14
mov dword [esp + 0x1c], eax
test dl, 2
je 0x5220b8
mov eax, dword [esp + 0x70]
movzx ecx, ax
jmp 0x5220bb
movzx ecx, di
mov ebx, dword [esp + 0x14]
mov word [esi + 0x16], cx
test dl, 0x10
jne 0x522118
movzx ecx, word [esi + 0x18]
cmp cx, word [ebx + 0x34]
jae 0x522118
cmp cx, word [ebx + 0x32]
jb 0x5220e1
mov eax, dword [ebx + 0x38]
and al, 3
cmp al, 2
je 0x522118
cmp ecx, 3
jbe 0x5220f2
push dword [esp + 0x48]
call fcn.004f19e0
add esp, 4
mov eax, dword [esp + 0xec]
mov edi, dword [esp + 0x18]
add eax, ebp
push eax
push ebx
push dword [esp + 0x2c]
push edi
call fcn.005219f0
mov eax, dword [esp + 0x4c]
add esp, 0x10
mov word [esi + 0x16], ax
jmp 0x52212e
mov eax, dword [esp + 0x3c]
mov edi, dword [esp + 0x18]
mov word [esi + 0x16], ax
jmp 0x52212e
mov edi, dword [esp + 0x18]
mov ebx, dword [esp + 0x14]
lea eax, [esp + 0x78]
push eax
call fcn.005254a0
add esp, 4
mov ebp, eax
cmp dword [esp + 0x1c], 0
je 0x521b44
mov eax, dword [esp + 0x4c]
mov edx, dword [esp + 0x40]
mov ebp, dword [esp + 0x64]
mov ecx, dword [esp + 0x5c]
mov dword [esi], eax
mov eax, dword [esp + 0x50]
mov dword [esi + 4], eax
mov eax, dword [esp + 0x54]
mov word [esi + 0x1a], ax
mov eax, dword [esp + 0x58]
mov word [esi + 0x1c], ax
mov eax, dword [esp + 0x44]
mov dword [esi + 0x2c], eax
mov eax, dword [esp + 0x3c]
mov word [esi + 0x18], dx
mov word [esi + 0x32], bp
mov word [esi + 0x16], ax
mov word [esi + 0x30], cx
cmp dx, bp
jne 0x52226d
movzx ecx, word [ebx + 0x32]
movzx eax, dx
inc eax
cmp eax, ecx
jae 0x52226d
mov ebp, dword [esp + 0x60]
cmp dx, bp
jne 0x52226d
mov eax, dword [ebx + 0x38]
test al, 0x40
jne 0x52226d
test al, al
jns 0x52226d
mov ecx, dword [esp + 0x38]
test dword [ecx + 0x50], 0x4000
jne 0x52226d
mov eax, dword [ebx + 8]
movzx edi, dx
cmp word [eax + edi*2 + 2], 0x2a
jl 0x52226d
movzx eax, bp
inc eax
push eax
push esi
push ecx
call fcn.005238c0
mov ebp, eax
add esp, 0xc
test ebp, ebp
jne 0x522271
movzx ecx, word [esi + 0x30]
mov eax, dword [esi + 0x38]
inc word [esi + 0x18]
inc word [esi + 0x32]
mov dword [eax + ecx*4], ebp
inc word [esi + 0x30]
or dword [esi + 0x2c], 0x8000
mov eax, dword [ebx + 8]
mov cx, word [eax + edi*2]
sub cx, word [eax + edi*2 + 2]
mov eax, dword [esp + 0xec]
movzx ecx, cx
add eax, 5
sub word [esi + 0x16], cx
add eax, ecx
push eax
mov eax, dword [esp + 0x1c]
push ebx
push dword [esp + 0x2c]
push eax
call fcn.005219f0
mov eax, dword [esp + 0x4c]
add esp, 0x10
mov word [esi + 0x16], ax
mov eax, dword [esp + 0x40]
mov word [esi + 0x18], ax
mov eax, dword [esp + 0x64]
mov word [esi + 0x32], ax
mov eax, dword [esp + 0x44]
mov dword [esi + 0x2c], eax
jmp 0x522271
mov ebp, dword [esp + 0x1c]
mov ecx, dword [esp + 0xd8]
mov eax, ebp
pop ebp
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0052df19
add esp, 0xcc
ret