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

Disassembly:
push 0xffffffffffffffff
push 0x591250
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x61e69c]
xor eax, esp
push eax
lea eax, [esp + 0x70]
mov dword fs:[0], eax
mov edi, ecx
mov dword [esp + 0x18], edi
mov al, byte [edi + 0x6c]
not al
and al, 1
jne 0x51f407
mov eax, dword [edi + 0x6c]
mov ecx, eax
shr ecx, 1
test cl, 1
jne 0x51f407
and eax, 0x18
cmp al, 0x18
je 0x51f407
mov eax, dword [edi + 0x6c]
mov edx, eax
shr edx, 4
test dl, 1
je 0x51f3fd
shr eax, 3
test al, 1
je 0x51f407
xor ebx, ebx
cmp dword [edi + 0xe8], ebx
je 0x51f41d
xor al, al
mov ecx, dword [esp + 0x70]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x68
ret
lea eax, [edi + 0xc0]
mov dword [esp + 0x20], eax
mov eax, dword [eax + 0x1c]
cmp eax, ebx
je 0x51fb57
mov ecx, dword [eax + 0x10]
sub ecx, dword [eax + 0xc]
sar ecx, 2
movzx esi, cx
mov dword [esp + 0x30], esi
cmp si, bx
je 0x51fb57
lea ecx, [esp + 0x3c]
call fcn.0051e300
xor edx, edx
xor ebp, ebp
mov dword [esp + 0x78], ebx
mov dword [esp + 0x38], ebx
cmp dx, si
jae 0x51f589
lea esp, [esp]
mov al, byte [edi + 0x6c]
not al
and al, 1
je 0x51f47d
xor esi, esi
jmp 0x51f4b8
mov ecx, dword [esp + 0x20]
push ebp
call fcn.00522310
test al, al
jne 0x51f48f
xor esi, esi
jmp 0x51f4b8
mov ecx, dword [esp + 0x18]
mov esi, dword [ecx + 0xdc]
mov edx, dword [esi + 0x10]
sub edx, dword [esi + 0xc]
movzx edi, bp
sar edx, 2
cmp edi, edx
jb 0x51f4ae
call fcn.004f825e
mov eax, dword [esi + 0xc]
mov esi, dword [eax + edi*4]
mov edi, dword [esp + 0x18]
mov ecx, dword [esi + 0x6c]
shr ecx, 5
test cl, 1
je 0x51f57d
mov edx, dword [esp + 0x20]
push edx
push ebp
mov ecx, edi
call fcn.0051c650
mov ecx, eax
call fcn.00521650
cmp dword [esi + 0x74], 0
lea eax, [esi + 0x70]
je 0x51f4ea
cmp dword [eax + 8], 0
ja 0x51f4f2
push eax
mov ecx, esi
call fcn.00520c40
cmp dword [esi + 0x84], 0
lea eax, [esi + 0x80]
je 0x51f507
cmp dword [eax + 8], 0
ja 0x51f50f
push eax
mov ecx, esi
call fcn.00520710
push 1
mov ecx, esi
call fcn.00521300
push 0
mov ecx, esi
mov edi, eax
call fcn.00521300
mov esi, dword [esi + 0x28]
sub eax, edi
cdq
add ebx, eax
mov eax, dword [esp + 0x38]
adc eax, edx
mov dword [esp + 0x38], eax
mov dword [esp + 0x68], eax
lea eax, [esp + 0x54]
add esi, edi
push eax
lea ecx, [esp + 0x40]
mov word [esp + 0x58], bp
mov dword [esp + 0x5c], esi
mov dword [esp + 0x60], 0
mov dword [esp + 0x68], ebx
call fcn.0051e360
mov ecx, dword [esp + 0x4c]
sub ecx, dword [esp + 0x48]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
je 0x51f5cf
mov edi, dword [esp + 0x18]
inc ebp
cmp bp, word [esp + 0x30]
jb 0x51f470
mov eax, dword [esp + 0x4c]
mov ebx, dword [esp + 0x48]
sub eax, ebx
mov ecx, eax
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov esi, edx
shr esi, 0x1f
add esi, edx
jne 0x51f5db
test ebx, ebx
je 0x51f5b7
mov edx, ebx
push edx
call fcn.004f6734
add esp, 4
xor eax, eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x3c]
push eax
jmp 0x51fb4f
push 0
push 0xdf
call fcn.0051e510
mov ecx, dword [esp + 0x20]
call fcn.00522020
mov ecx, dword [edi + 0x34]
mov edx, dword [ecx]
mov eax, dword [edx + 0x14]
call eax
dec esi
xor ebp, ebp
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], esi
mov dword [esp + 0x28], ebp
mov dword [esp + 0x24], ebp
mov dword [esp + 0x1c], ebp
cmp ebp, dword [esp + 0x30]
jne 0x51f61a
mov esi, dword [esp + 0x2c]
mov edi, dword [esp + 0x18]
sub esi, dword [edi + 0x58]
mov bl, 1
jmp 0x51f678
lea ecx, [ebp + 1]
push ecx
lea ecx, [esp + 0x40]
call fcn.0051db90
mov dl, byte [edi + 0x6c]
movzx esi, word [eax]
not dl
and dl, 1
je 0x51f638
xor eax, eax
jmp 0x51f66f
mov ecx, dword [esp + 0x20]
push esi
call fcn.00522310
test al, al
jne 0x51f64a
xor eax, eax
jmp 0x51f66f
movzx ebp, si
mov esi, dword [edi + 0xdc]
mov eax, dword [esi + 0x10]
sub eax, dword [esi + 0xc]
sar eax, 2
cmp ebp, eax
jb 0x51f665
call fcn.004f825e
mov ecx, dword [esi + 0xc]
mov eax, dword [ecx + ebp*4]
mov ebp, dword [esp + 0x1c]
mov esi, dword [eax + 0x28]
mov edi, dword [esp + 0x18]
xor bl, bl
mov ecx, dword [esp + 0x4c]
sub ecx, dword [esp + 0x48]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebp, eax
jb 0x51f69a
call fcn.004f825e
mov edx, dword [esp + 0x48]
mov ecx, dword [esp + 0x24]
lea eax, [edx + ecx]
mov dword [eax + 8], esi
sub esi, dword [eax + 4]
add dword [esp + 0x28], esi
test bl, bl
jne 0x51f6c2
mov edi, dword [esp + 0x18]
inc ebp
add dword [esp + 0x24], 0x18
jmp 0x51f601
mov ebp, dword [esp + 0x30]
push ebp
lea ecx, [esp + 0x40]
call fcn.0051db90
mov ecx, dword [eax + 0x10]
mov eax, dword [eax + 0x14]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], eax
test eax, eax
jl 0x51f700
jg 0x51f6e8
test ecx, ecx
jbe 0x51f700
mov esi, dword [esp + 0x2c]
mov ecx, dword [edi + 0x34]
mov edx, dword [ecx]
xor ebx, ebx
add esi, dword [esp + 0x34]
adc ebx, eax
mov eax, dword [edx + 0x18]
push ebx
push esi
call eax
mov edx, dword [edi + 0x158]
xor ebx, ebx
push ebx
lea ecx, [edi + 0x14c]
push edx
call fcn.00521d30
lea eax, [esp + 0x24]
push eax
push 0x200
lea ecx, [edi + 8]
mov dword [esp + 0x2c], ebx
call fcn.005290b0
test eax, eax
je 0x51f75e
mov esi, dword [esp + 0x24]
lea ecx, [esp + 0x54]
push ecx
mov ecx, edi
mov dword [esi + 0x44], 0x200
mov dword [esp + 0x28], esi
call fcn.0051da60
mov edi, 8
mov byte [esp + 0x78], 1
cmp dword [eax + 0x18], edi
jb 0x51f764
mov eax, dword [eax + 4]
jmp 0x51f767
mov dword [esp + 0x24], ebx
jmp 0x51f7a0
add eax, 4
mov edx, dword [esi]
push eax
mov eax, dword [edx + 0xc]
push ebx
mov ecx, esi
call eax
mov byte [esp + 0x78], 0
cmp dword [esp + 0x6c], edi
jb 0x51f78a
mov ecx, dword [esp + 0x58]
push ecx
call fcn.004f6734
add esp, 4
mov edx, dword [esi]
mov eax, dword [esp + 0x28]
mov edx, dword [edx + 0x10]
push eax
mov ecx, esi
call edx
jmp 0x51f7a0
mov edi, dword [esp + 0x4c]
mov ecx, dword [esp + 0x48]
mov edx, edi
sub edx, ecx
mov eax, 0x2aaaaaab
imul edx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebp, eax
jb 0x51f7ce
call fcn.004f825e
mov edi, dword [esp + 0x4c]
mov ecx, dword [esp + 0x48]
lea edx, [ebp + ebp*2]
cmp dword [ecx + edx*8 + 0x14], 0
lea eax, [ecx + edx*8]
jl 0x51f81e
jg 0x51f7e4
cmp dword [eax + 0x10], 0
jbe 0x51f81e
mov edx, dword [esp + 0x24]
test ebp, ebp
sete byte [esp + 0x1c]
mov ecx, dword [esp + 0x1c]
push ecx
mov ecx, dword [eax + 0x10]
push 1
push edx
mov edx, dword [eax + 8]
mov eax, dword [eax + 4]
push ecx
mov ecx, dword [esp + 0x28]
push edx
push eax
call fcn.0051ec20
mov edi, dword [esp + 0x18]
cmp byte [esp + 0x1c], 0
jne 0x51f8db
dec ebp
jmp 0x51f7a0
mov dword [esp + 0x28], ebp
test ebp, ebp
jbe 0x51f851
lea esi, [ebp - 1]
push esi
lea ecx, [esp + 0x40]
call fcn.0051db90
cmp dword [eax + 0x14], 0
jg 0x51f847
jl 0x51f841
cmp dword [eax + 0x10], 0
ja 0x51f847
mov ebp, esi
test ebp, ebp
ja 0x51f826
mov edi, dword [esp + 0x4c]
mov ecx, dword [esp + 0x48]
test ebp, ebp
sete byte [esp + 0x1c]
lea esi, [ebp + ebp*2]
add esi, esi
add esi, esi
mov ebx, ebp
add esi, esi
sub edi, ecx
mov eax, 0x2aaaaaab
imul edi
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebx, eax
jb 0x51f882
call fcn.004f825e
mov ecx, dword [esp + 0x48]
cmp ebx, dword [esp + 0x28]
sete al
cmp byte [esp + 0x1c], 0
mov byte [esp + 0x17], al
je 0x51f89c
test al, al
je 0x51f89c
mov al, 1
jmp 0x51f89e
xor al, al
mov edx, dword [esp + 0x24]
mov edi, dword [esp + 0x18]
push eax
mov eax, dword [ecx + esi + 0x10]
push 0
push edx
mov edx, dword [ecx + esi + 8]
neg eax
push eax
mov eax, dword [ecx + esi + 4]
push edx
push eax
mov ecx, edi
call fcn.0051ec20
cmp byte [esp + 0x17], 0
jne 0x51f810
mov edi, dword [esp + 0x4c]
mov ecx, dword [esp + 0x48]
inc ebx
add esi, 0x18
jmp 0x51f862
lea ecx, [edi + 0x14c]
call fcn.00521d00
mov edx, dword [esp + 0x38]
test edx, edx
jg 0x51f90f
jl 0x51f8f7
cmp dword [esp + 0x34], 0
jae 0x51f90f
mov eax, dword [esp + 0x2c]
mov ecx, dword [edi + 0x34]
mov esi, dword [ecx]
xor ebx, ebx
add eax, dword [esp + 0x34]
adc ebx, edx
mov edx, dword [esi + 0x18]
push ebx
push eax
call edx
xor esi, esi
mov dword [esp + 0x1c], esi
cmp esi, dword [esp + 0x30]
mov ecx, dword [esp + 0x4c]
sete bl
sub ecx, dword [esp + 0x48]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
mov byte [esp + 0x17], bl
cmp esi, eax
jb 0x51f942
call fcn.004f825e
mov edx, dword [esp + 0x48]
lea ecx, [esi + esi*2]
movzx esi, word [edx + ecx*8]
lea eax, [edx + ecx*8]
mov dword [esp + 0x28], eax
mov al, byte [edi + 0x6c]
not al
test al, 1
je 0x51f967
mov dword [esp + 0x2c], 0
jmp 0x51f9a4
mov ecx, dword [esp + 0x20]
push esi
call fcn.00522310
test al, al
jne 0x51f97f
mov dword [esp + 0x2c], 0
jmp 0x51f9a4
movzx ebp, si
mov esi, dword [edi + 0xdc]
mov ecx, dword [esi + 0x10]
sub ecx, dword [esi + 0xc]
sar ecx, 2
cmp ebp, ecx
jb 0x51f99a
call fcn.004f825e
mov edx, dword [esi + 0xc]
mov eax, dword [edx + ebp*4]
mov dword [esp + 0x2c], eax
test bl, bl
je 0x51f9b8
mov ebp, dword [esp + 0x18]
mov ecx, ebp
call fcn.00407fa0
movzx edi, ax
jmp 0x51f9ce
mov ecx, dword [esp + 0x1c]
inc ecx
push ecx
lea ecx, [esp + 0x40]
call fcn.0051db90
movzx edi, word [eax]
mov ebp, dword [esp + 0x18]
mov edx, dword [esp + 0x28]
movzx eax, word [edx]
cmp ax, di
jae 0x51fa3c
inc eax
movzx esi, ax
cmp si, di
jae 0x51fa3c
movzx ebx, si
mov al, byte [ebp + 0x6c]
not al
test al, 1
je 0x51f9f3
xor eax, eax
jmp 0x51fa2b
mov ecx, dword [esp + 0x20]
push esi
call fcn.00522310
test al, al
jne 0x51fa05
xor eax, eax
jmp 0x51fa2b
mov ecx, dword [esp + 0x18]
mov ebp, dword [ecx + 0xdc]
mov edx, dword [ebp + 0x10]
sub edx, dword [ebp + 0xc]
sar edx, 2
cmp ebx, edx
jb 0x51fa21
call fcn.004f825e
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + ebx*4]
mov ebp, dword [esp + 0x18]
mov ecx, dword [esp + 0x28]
mov edx, dword [ecx + 0x10]
add dword [eax + 0x28], edx
inc esi
inc ebx
cmp si, di
jb 0x51f9e6
mov ebx, dword [esp + 0x1c]
test ebx, ebx
jne 0x51fa4a
xor ecx, ecx
xor eax, eax
jmp 0x51fa5d
lea eax, [ebx - 1]
push eax
lea ecx, [esp + 0x40]
call fcn.0051db90
mov ecx, dword [eax + 0x10]
mov eax, dword [eax + 0x14]
mov edi, dword [esp + 0x2c]
mov edx, dword [edi + 0x28]
xor esi, esi
add edx, ecx
push 0
adc esi, eax
push esi
lea esi, [ebp + 0x30]
push edx
mov ecx, esi
call fcn.00527310
push esi
mov ecx, edi
call fcn.00521850
and dword [edi + 0x6c], 0xffffffdf
mov ecx, esi
call fcn.005257a0
cmp byte [esp + 0x17], 0
jne 0x51faa2
mov edi, dword [esp + 0x18]
inc ebx
mov dword [esp + 0x1c], ebx
mov esi, ebx
jmp 0x51f915
cmp byte [ebp + 0xec], 0
je 0x51fb1c
mov al, byte [ebp + 0x6c]
not al
test al, 1
jne 0x51fb1c
mov eax, dword [esi + 0x3c]
mov ecx, eax
shr ecx, 1
test cl, 1
jne 0x51fb1c
and eax, 0x18
cmp al, 0x18
je 0x51fb1c
mov edi, dword [esp + 0x20]
mov ecx, edi
call fcn.00522620
test al, al
jne 0x51fb1c
mov ecx, edi
call fcn.005233b0
mov ecx, esi
call fcn.005257a0
mov eax, dword [esi + 0x3c]
mov edx, eax
shr edx, 1
test dl, 1
jne 0x51fb01
and eax, 0x18
cmp al, 0x18
je 0x51fb01
mov ecx, dword [esi + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 8]
call edx
mov eax, dword [esi + 0x3c]
mov ecx, eax
shr ecx, 4
test cl, 1
je 0x51fb1c
shr eax, 3
test al, 1
jne 0x51fb1c
mov ecx, esi
call fcn.00526f00
mov ecx, dword [esp + 0x24]
xor esi, esi
cmp ecx, esi
je 0x51fb2d
mov edx, dword [ecx]
mov eax, dword [edx + 0x18]
call eax
mov eax, dword [esp + 0x48]
cmp eax, esi
je 0x51fb3e
push eax
call fcn.004f6734
add esp, 4
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x48], esi
mov dword [esp + 0x4c], esi
mov dword [esp + 0x50], esi
push ecx
call fcn.004f6734
add esp, 4
mov al, 1
mov ecx, dword [esp + 0x70]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x68
ret