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

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffff70
mov ebx, eax
test ebx, ebx
je 0x5219f7
cmp byte [ebx + 0xba], 3
jne 0x5219f7
cmp dword [ebx + 0xc8], 0
jne 0x520b03
cmp dword [0x66aca4], 0
je 0x520aef
mov eax, dword [0x66aca4]
mov byte [eax + 0x3997], 1
mov byte [ebx + 0xba], 2
xor eax, eax
mov dword [ebx + 0xbc], eax
jmp 0x5219f7
mov eax, dword [ebx]
mov edi, dword [eax + 0x14e0]
cmp byte [ebx + 0xb9], 0
je 0x520b1b
mov eax, ebx
call fcn.00520068
mov ecx, ebx
mov eax, dword [ecx + 0xa8]
mov edx, dword [ecx + 0xac]
cmp edx, dword [ecx + 0x70]
jne 0x520b35
cmp eax, dword [ecx + 0x6c]
jae 0x520b57
jmp 0x520b37
jge 0x520b57
mov eax, dword [ecx + 0x6c]
mov dword [ecx + 0xa8], eax
mov eax, dword [ecx + 0x70]
mov dword [ecx + 0xac], eax
mov eax, ebx
call fcn.0051ff80
mov eax, ebx
call fcn.005202ec
mov esi, ebx
cmp dword [esi + 0x94], 0
jne 0x520b7f
cmp dword [esi + 0x90], 0
jne 0x520b7f
mov byte [esi + 0xba], 2
xor eax, eax
mov dword [esi + 0xbc], eax
jmp 0x5219f7
mov eax, dword [esi + 0xa8]
mov edx, dword [esi + 0xac]
cmp edx, dword [esi + 0x78]
jne 0x520b9b
cmp eax, dword [esi + 0x74]
jbe 0x520f83
jmp 0x520ba1
jle 0x520f83
cmp dword [esi + 0xa4], 0
jne 0x520bb1
cmp dword [esi + 0xa0], 0
je 0x520c7b
cmp dword [esi + 0x94], 0
jne 0x520bcb
cmp dword [esi + 0x90], 0
jae 0x520c31
jmp 0x520bcd
jge 0x520c31
push 0
push 2
mov eax, dword [esi + 0x90]
mov edx, dword [esi + 0x94]
neg eax
adc edx, 0
neg edx
call fcn.00405210
mov dword [esp + 0x38], eax
cmp dword [esp + 0x38], 0
jbe 0x520c01
mov eax, 2
sub eax, dword [esp + 0x38]
mov dword [esp + 0x38], eax
push 0
push 2
mov eax, dword [esi + 0x90]
mov edx, dword [esi + 0x94]
push edx
push eax
mov eax, dword [esp + 0x48]
xor edx, edx
sub dword [esp], eax
sbb dword [esp + 4], edx
pop eax
pop edx
call fcn.0040517c
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], edx
jmp 0x520c67
push 0
push 2
mov eax, dword [esi + 0x90]
mov edx, dword [esi + 0x94]
call fcn.00405210
mov dword [esp + 0x38], eax
push 0
push 2
mov eax, dword [esi + 0x90]
mov edx, dword [esi + 0x94]
call fcn.0040517c
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], edx
mov eax, dword [esp + 0x68]
mov dword [esi + 0x90], eax
mov eax, dword [esp + 0x6c]
mov dword [esi + 0x94], eax
cmp dword [esi + 0x94], 0
jne 0x520c8f
cmp dword [esi + 0x90], 0
jae 0x520cf5
jmp 0x520c91
jge 0x520cf5
push 0
push 2
mov eax, dword [esi + 0x90]
mov edx, dword [esi + 0x94]
neg eax
adc edx, 0
neg edx
call fcn.00405210
mov dword [esp + 0x38], eax
cmp dword [esp + 0x38], 0
jbe 0x520cc5
mov eax, 2
sub eax, dword [esp + 0x38]
mov dword [esp + 0x38], eax
push 0
push 2
mov eax, dword [esi + 0x90]
mov edx, dword [esi + 0x94]
push edx
push eax
mov eax, dword [esp + 0x48]
xor edx, edx
sub dword [esp], eax
sbb dword [esp + 4], edx
pop eax
pop edx
call fcn.0040517c
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], edx
jmp 0x520d2b
push 0
push 2
mov eax, dword [esi + 0x90]
mov edx, dword [esi + 0x94]
call fcn.00405210
mov dword [esp + 0x38], eax
push 0
push 2
mov eax, dword [esi + 0x90]
mov edx, dword [esi + 0x94]
call fcn.0040517c
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], edx
mov eax, dword [esp + 0x70]
mov dword [esi + 0xa0], eax
mov eax, dword [esp + 0x74]
mov dword [esi + 0xa4], eax
mov eax, dword [esi + 0x6c]
mov edx, dword [esi + 0x70]
cmp edx, dword [esi + 0xa4]
jne 0x520d57
cmp eax, dword [esi + 0xa0]
ja 0x520d76
jmp 0x520d59
jg 0x520d76
mov eax, dword [esi + 0xa0]
mov dword [esi + 0x98], eax
mov eax, dword [esi + 0xa4]
mov dword [esi + 0x9c], eax
jmp 0x520f43
mov eax, dword [esi + 0x6c]
mov edx, dword [esi + 0x70]
sub eax, dword [esi + 0xa0]
sbb edx, dword [esi + 0xa4]
cmp edx, 0
jne 0x520d98
cmp eax, 0
jae 0x520e33
jmp 0x520d9e
jge 0x520e33
push dword [esi + 0x94]
push dword [esi + 0x90]
mov eax, dword [esi + 0x6c]
mov edx, dword [esi + 0x70]
sub eax, dword [esi + 0xa0]
sbb edx, dword [esi + 0xa4]
neg eax
adc edx, 0
neg edx
call fcn.00405210
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], edx
cmp dword [esp + 0x44], 0
jne 0x520de0
cmp dword [esp + 0x40], 0
jbe 0x520dfe
jmp 0x520de2
jle 0x520dfe
mov eax, dword [esi + 0x90]
mov edx, dword [esi + 0x94]
sub eax, dword [esp + 0x40]
sbb edx, dword [esp + 0x44]
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], edx
push dword [esi + 0x94]
push dword [esi + 0x90]
mov eax, dword [esi + 0x6c]
mov edx, dword [esi + 0x70]
sub eax, dword [esi + 0xa0]
sbb edx, dword [esi + 0xa4]
sub eax, dword [esp + 0x48]
sbb edx, dword [esp + 0x4c]
call fcn.0040517c
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], edx
jmp 0x520e89
push dword [esi + 0x94]
push dword [esi + 0x90]
mov eax, dword [esi + 0x6c]
mov edx, dword [esi + 0x70]
sub eax, dword [esi + 0xa0]
sbb edx, dword [esi + 0xa4]
call fcn.00405210
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], edx
push dword [esi + 0x94]
push dword [esi + 0x90]
mov eax, dword [esi + 0x6c]
mov edx, dword [esi + 0x70]
sub eax, dword [esi + 0xa0]
sbb edx, dword [esi + 0xa4]
call fcn.0040517c
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], edx
push dword [esi + 0x94]
push dword [esi + 0x90]
mov eax, dword [esp + 0x80]
mov edx, dword [esp + 0x84]
call fcn.00405158
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], edx
mov eax, dword [esp + 0x58]
mov edx, dword [esp + 0x5c]
add eax, dword [esi + 0xa0]
adc edx, dword [esi + 0xa4]
mov dword [esi + 0x98], eax
mov dword [esi + 0x9c], edx
mov eax, dword [esi + 0x8c]
cdq
add eax, dword [esi + 0x98]
adc edx, dword [esi + 0x9c]
cmp edx, dword [esi + 0x70]
jne 0x520eef
cmp eax, dword [esi + 0x6c]
ja 0x520f17
jmp 0x520ef1
jg 0x520f17
mov eax, dword [esi + 0x98]
mov edx, dword [esi + 0x9c]
add eax, dword [esi + 0x90]
adc edx, dword [esi + 0x94]
mov dword [esi + 0x98], eax
mov dword [esi + 0x9c], edx
jmp 0x520f43
mov eax, dword [esi + 0x98]
mov edx, dword [esi + 0x9c]
cmp edx, dword [esi + 0x70]
jne 0x520f2f
cmp eax, dword [esi + 0x6c]
jae 0x520f43
jmp 0x520f31
jge 0x520f43
mov eax, dword [esi + 0x6c]
mov dword [esi + 0x98], eax
mov eax, dword [esi + 0x70]
mov dword [esi + 0x9c], eax
mov eax, dword [esi + 0x98]
mov dword [esi + 0xa8], eax
mov eax, dword [esi + 0x9c]
mov dword [esi + 0xac], eax
mov eax, ebx
call fcn.0051ff80
mov eax, dword [esi + 0xa8]
mov edx, dword [esi + 0xac]
cmp edx, dword [esi + 0x78]
jne 0x520f7d
cmp eax, dword [esi + 0x74]
jbe 0x520f83
jmp 0x520b57
jg 0x520b57
mov eax, dword [esi + 0x8c]
add eax, eax
cdq
cmp edx, dword [esi + 0x94]
jne 0x520f9e
cmp eax, dword [esi + 0x90]
jbe 0x520fb4
jmp 0x520fa0
jle 0x520fb4
mov byte [esi + 0xba], 2
xor eax, eax
mov dword [esi + 0xbc], eax
jmp 0x5219f7
inc dword [ebx + 0xc0]
mov esi, ebx
mov eax, dword [esi + 0x8c]
cdq
cmp edx, dword [esi + 0xac]
jne 0x520fd5
cmp eax, dword [esi + 0xa8]
jbe 0x521000
jmp 0x520fd7
jle 0x521000
mov dword [esi + 0xa0], 0
mov dword [esi + 0xa4], 0
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0
jmp 0x521246
cmp dword [esi + 0x94], 0
jne 0x521014
cmp dword [esi + 0x90], 0
jae 0x521080
jmp 0x521016
jge 0x521080
push 0
push 2
mov eax, dword [esi + 0x90]
mov edx, dword [esi + 0x94]
neg eax
adc edx, 0
neg edx
call fcn.00405210
mov dword [esp + 0x38], eax
cmp dword [esp + 0x38], 0
jbe 0x52104a
mov eax, 2
sub eax, dword [esp + 0x38]
mov dword [esp + 0x38], eax
push 0
push 2
mov eax, dword [esi + 0x90]
mov edx, dword [esi + 0x94]
push edx
push eax
mov eax, dword [esp + 0x48]
xor edx, edx
sub dword [esp], eax
sbb dword [esp + 4], edx
pop eax
pop edx
call fcn.0040517c
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], edx
jmp 0x5210bc
push 0
push 2
mov eax, dword [esi + 0x90]
mov edx, dword [esi + 0x94]
call fcn.00405210
mov dword [esp + 0x38], eax
push 0
push 2
mov eax, dword [esi + 0x90]
mov edx, dword [esi + 0x94]
call fcn.0040517c
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], edx
mov eax, dword [esp + 0x80]
mov dword [esi + 0xa0], eax
mov eax, dword [esp + 0x84]
mov dword [esi + 0xa4], eax
mov eax, dword [esi + 0xa8]
mov edx, dword [esi + 0xac]
sub eax, dword [esi + 0xa0]
sbb edx, dword [esi + 0xa4]
cmp edx, 0
jne 0x5210fe
cmp eax, 0
jae 0x5211ab
jmp 0x521104
jge 0x5211ab
push dword [esi + 0x94]
push dword [esi + 0x90]
mov eax, dword [esi + 0xa8]
mov edx, dword [esi + 0xac]
sub eax, dword [esi + 0xa0]
sbb edx, dword [esi + 0xa4]
neg eax
adc edx, 0
neg edx
call fcn.00405210
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], edx
cmp dword [esp + 0x44], 0
jne 0x52114c
cmp dword [esp + 0x40], 0
jbe 0x52116a
jmp 0x52114e
jle 0x52116a
mov eax, dword [esi + 0x90]
mov edx, dword [esi + 0x94]
sub eax, dword [esp + 0x40]
sbb edx, dword [esp + 0x44]
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], edx
push dword [esi + 0x94]
push dword [esi + 0x90]
mov eax, dword [esi + 0xa8]
mov edx, dword [esi + 0xac]
sub eax, dword [esi + 0xa0]
sbb edx, dword [esi + 0xa4]
sub eax, dword [esp + 0x48]
sbb edx, dword [esp + 0x4c]
call fcn.0040517c
mov dword [esp + 0x88], eax
mov dword [esp + 0x8c], edx
jmp 0x521213
push dword [esi + 0x94]
push dword [esi + 0x90]
mov eax, dword [esi + 0xa8]
mov edx, dword [esi + 0xac]
sub eax, dword [esi + 0xa0]
sbb edx, dword [esi + 0xa4]
call fcn.00405210
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], edx
push dword [esi + 0x94]
push dword [esi + 0x90]
mov eax, dword [esi + 0xa8]
mov edx, dword [esi + 0xac]
sub eax, dword [esi + 0xa0]
sbb edx, dword [esi + 0xa4]
call fcn.0040517c
mov dword [esp + 0x88], eax
mov dword [esp + 0x8c], edx
push dword [esi + 0x94]
push dword [esi + 0x90]
mov eax, dword [esp + 0x90]
mov edx, dword [esp + 0x94]
call fcn.00405158
add eax, dword [esi + 0xa0]
adc edx, dword [esi + 0xa4]
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
mov eax, ebx
call fcn.005202ec
mov eax, dword [ebx + 0x8c]
cdq
add eax, dword [esp + 8]
adc edx, dword [esp + 0xc]
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
mov eax, dword [ebx + 0x74]
mov edx, dword [ebx + 0x78]
add eax, 1
adc edx, 0
cmp edx, dword [esp + 0x14]
jne 0x52127e
cmp eax, dword [esp + 0x10]
jae 0x521294
jmp 0x521280
jge 0x521294
mov eax, dword [ebx + 0x74]
mov edx, dword [ebx + 0x78]
add eax, 1
adc edx, 0
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
mov eax, dword [ebx]
mov edx, dword [eax + 0x14f8]
mov eax, dword [eax + 0x14f4]
cmp edx, dword [esp + 0x14]
jne 0x5212b0
cmp eax, dword [esp + 0x10]
jae 0x5212c8
jmp 0x5212b2
jge 0x5212c8
mov eax, dword [ebx]
mov edx, dword [eax + 0x14f4]
mov dword [esp + 0x10], edx
mov edx, dword [eax + 0x14f8]
mov dword [esp + 0x14], edx
mov eax, dword [ebx + 0xa8]
mov dword [esp + 0x28], eax
mov eax, dword [ebx + 0xac]
mov dword [esp + 0x2c], eax
cmp dword [ebx + 8], 0x30002
jbe 0x5212ec
mov dword [ebx + 8], 0x30002
mov byte [esp + 0x34], 1
jmp 0x52194e
cmp byte [0x66ac9c], 0
je 0x521324
mov eax, dword [esp + 0x28]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x24], eax
jmp 0x52146c
push dword [esp + 0x2c]
push dword [esp + 0x2c]
lea ecx, [esp + 0x28]
lea edx, [esp + 0x20]
mov eax, ebx
call fcn.00520094
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
cmp edx, dword [esp + 0x14]
jne 0x521355
cmp eax, dword [esp + 0x10]
jb 0x52146c
jmp 0x52135b
jl 0x52146c
mov dword [esp + 0x60], ebx
mov eax, dword [esp + 0x60]
mov edx, dword [eax + 0x94]
mov eax, dword [eax + 0x90]
mov ecx, dword [esp + 0x60]
cmp edx, dword [ecx + 0x78]
jne 0x52137f
cmp eax, dword [ecx + 0x74]
ja 0x5213b3
jmp 0x521381
jg 0x5213b3
mov eax, dword [esp + 0x60]
mov edx, dword [eax + 0x78]
mov eax, dword [eax + 0x74]
mov ecx, dword [esp + 0x60]
sub eax, dword [ecx + 0x90]
sbb edx, dword [ecx + 0x94]
mov ecx, dword [esp + 0x60]
cmp edx, dword [ecx + 0xac]
jne 0x5213b1
cmp eax, dword [ecx + 0xa8]
jae 0x5213d5
jmp 0x5213b3
jge 0x5213d5
mov eax, dword [esp + 0x60]
mov edx, dword [eax + 0x78]
mov eax, dword [eax + 0x74]
add eax, 1
adc edx, 0
mov ecx, dword [esp + 0x60]
mov dword [ecx + 0xa8], eax
mov dword [ecx + 0xac], edx
jmp 0x5213fd
mov eax, dword [esp + 0x60]
mov edx, dword [eax + 0x94]
mov eax, dword [eax + 0x90]
add eax, dword [esp + 8]
adc edx, dword [esp + 0xc]
mov ecx, dword [esp + 0x60]
mov dword [ecx + 0xa8], eax
mov dword [ecx + 0xac], edx
mov eax, dword [esp + 0x60]
mov edx, dword [eax + 0xac]
mov eax, dword [eax + 0xa8]
mov ecx, dword [esp + 0x60]
cmp edx, dword [ecx + 0x78]
jne 0x52141d
cmp eax, dword [ecx + 0x74]
jbe 0x52141f
jmp 0x52145a
jg 0x52145a
mov eax, dword [ebx + 0xa8]
mov dword [esp + 8], eax
mov eax, dword [ebx + 0xac]
mov dword [esp + 0xc], eax
mov eax, dword [ebx + 0x8c]
cdq
add eax, dword [esp + 8]
adc edx, dword [esp + 0xc]
cmp edx, dword [esp + 0x1c]
jne 0x521454
cmp eax, dword [esp + 0x18]
jbe 0x52135b
jmp 0x52145a
jle 0x52135b
mov eax, ebx
call fcn.0051ff80
inc dword [ebx + 0xc0]
jmp 0x5219f7
cmp byte [ebx + 0xc4], 0
je 0x521485
cmp byte [esp + 0x34], 0
jne 0x521485
call fcn.0041f148
test al, al
jne 0x52148e
cmp byte [ebx + 0xba], 3
je 0x5214a7
mov eax, dword [esp + 0x28]
mov dword [ebx + 0xa8], eax
mov eax, dword [esp + 0x2c]
mov dword [ebx + 0xac], eax
jmp 0x5219f7
mov byte [esp + 0x34], 0
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
cmp edx, dword [esp + 0x2c]
jne 0x5214c2
cmp eax, dword [esp + 0x28]
jbe 0x5214cc
jmp 0x5214c4
jle 0x5214cc
xor eax, eax
mov dword [ebx + 0xd4], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
cmp edx, dword [esp + 0x24]
jne 0x5214f2
cmp eax, dword [esp + 0x20]
ja 0x521508
jmp 0x5214f4
jg 0x521508
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
sub eax, dword [esp + 0x28]
sbb edx, dword [esp + 0x2c]
mov ebp, eax
jmp 0x52151a
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
sub eax, dword [esp + 0x28]
sbb edx, dword [esp + 0x2c]
mov ebp, eax
mov eax, ebx
call fcn.005182d0
test al, al
je 0x521560
inc ebp
mov eax, ebp
xor edx, edx
add eax, dword [esp + 0x28]
adc edx, dword [esp + 0x2c]
mov ecx, dword [ebx]
cmp edx, dword [ecx + 0x14f8]
jne 0x521546
cmp eax, dword [ecx + 0x14f4]
jbe 0x521560
jmp 0x521548
jle 0x521560
mov eax, dword [ebx]
mov edx, dword [eax + 0x14f8]
mov eax, dword [eax + 0x14f4]
sub eax, dword [esp + 0x28]
sbb edx, dword [esp + 0x2c]
mov ebp, eax
imul ebp, edi
cmp ebp, dword [ebx + 0xd0]
jbe 0x521571
mov ebp, dword [ebx + 0xd0]
mov eax, dword [esp + 0x28]
mov dword [ebx + 0xa8], eax
mov eax, dword [esp + 0x2c]
mov dword [ebx + 0xac], eax
mov eax, ebx
call fcn.005202ec
mov eax, dword [ebx + 0xb0]
mov dword [esp + 0x50], eax
mov eax, dword [ebx + 0xb4]
mov dword [esp + 0x54], eax
cmp dword [0x66aca4], 0
je 0x5215b5
mov eax, dword [0x66aca4]
mov byte [eax + 0x3997], 1
cmp ebp, dword [ebx + 0xd4]
jbe 0x521688
mov eax, edi
xor edx, edx
push edx
push eax
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x34]
call fcn.00405158
push edx
push eax
mov eax, dword [ebx + 0xd4]
xor edx, edx
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
push edx
push eax
lea eax, [esp + 8]
push eax
push 0x1061c4
mov eax, dword [ebx + 0x1f0]
push eax
mov ecx, ebp
sub ecx, dword [ebx + 0xd4]
mov edx, dword [ebx + 0xc8]
add edx, dword [ebx + 0xd4]
mov eax, dword [ebx]
call fcn.0048af48
mov dword [esp + 0x30], eax
mov eax, dword [esp]
add dword [ebx + 0xd4], eax
cmp dword [esp + 0x30], 0xffff8200
je 0x521633
cmp dword [esp], 0
jne 0x52165b
mov eax, dword [esp + 0x28]
mov dword [ebx + 0xa8], eax
mov eax, dword [esp + 0x2c]
mov dword [ebx + 0xac], eax
mov byte [ebx + 0xba], 2
xor eax, eax
mov dword [ebx + 0xbc], eax
jmp 0x5219f7
mov eax, ebx
call fcn.005182d0
test al, al
je 0x521674
mov eax, edi
add eax, eax
cmp eax, dword [ebx + 0xd4]
jbe 0x521688
jmp 0x52167c
cmp edi, dword [ebx + 0xd4]
jbe 0x521688
cmp ebp, dword [ebx + 0xd4]
ja 0x5215c1
mov byte [ebx + 0x1f4], 1
mov ebp, dword [ebx + 0xd4]
mov eax, ebx
call fcn.005182d0
test al, al
je 0x5216ad
cmp edi, ebp
jae 0x5216a8
sub ebp, edi
jmp 0x5216ad
mov ebp, 1
mov byte [esp + 0x48], 1
xor esi, esi
cmp ebp, esi
jbe 0x5218ea
cmp byte [esp + 0x48], 0
je 0x52173a
mov byte [esp + 0x48], 0
cmp byte [ebx + 0xc4], 0
je 0x5216da
call fcn.0041f148
test al, al
jne 0x5216e3
cmp byte [ebx + 0xba], 3
je 0x52173a
mov eax, esi
xor edx, edx
div edi
imul edi
mov esi, eax
sub dword [ebx + 0xd4], esi
test esi, esi
jbe 0x521719
cmp dword [ebx + 0xd4], 0
jbe 0x521719
mov edx, dword [ebx + 0xc8]
mov eax, dword [ebx + 0xc8]
add eax, esi
mov ecx, dword [ebx + 0xd4]
call fcn.00402da0
mov eax, esi
xor edx, edx
div edi
xor edx, edx
add eax, dword [esp + 0x28]
adc edx, dword [esp + 0x2c]
mov dword [ebx + 0xa8], eax
mov dword [ebx + 0xac], edx
jmp 0x5219f7
mov eax, dword [ebx + 0xc8]
add eax, esi
cmp dword [eax], 0x454c4946
je 0x52176e
mov eax, dword [ebx + 0xc8]
add eax, esi
cmp dword [eax], 0x44414142
je 0x52176e
mov eax, dword [ebx + 0xc8]
add eax, esi
cmp dword [eax], 0x58444e49
jne 0x521829
push dword [esp + 0xc]
push dword [esp + 0xc]
mov eax, edi
xor edx, edx
push edx
push eax
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
call fcn.00405158
push edx
push eax
mov eax, esi
xor edx, edx
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
push edx
push eax
mov ecx, dword [ebx + 0xd4]
sub ecx, esi
mov edx, dword [ebx + 0xc8]
add edx, esi
mov eax, ebx
call fcn.00520778
test al, al
je 0x521829
cmp edi, esi
ja 0x5217bf
mov byte [esp + 0x48], 1
cmp byte [0x66ac9c], 0
jne 0x521829
cmp dword [0x66ac98], 0
jbe 0x521804
lea eax, [esi + 0x200]
xor edx, edx
div dword [0x66ac98]
imul dword [0x66ac98]
cmp esi, eax
jae 0x521804
lea eax, [esi + 0x200]
xor edx, edx
div dword [0x66ac98]
imul dword [0x66ac98]
mov esi, eax
jmp 0x5218e2
lea eax, [esi + 0x200]
shr eax, 9
shl eax, 9
cmp esi, eax
jae 0x521829
add esi, 0x200
shr esi, 9
mov eax, esi
shl eax, 9
mov esi, eax
jmp 0x5218e2
cmp dword [0x66ac98], 0
jbe 0x521842
cmp edi, dword [0x66ac98]
jb 0x521842
add esi, dword [0x66ac98]
jmp 0x521854
cmp edi, 0x200
ja 0x52184e
add esi, edi
jmp 0x521854
add esi, 0x200
cmp byte [esp + 0x48], 0
je 0x5218b0
mov eax, esi
xor edx, edx
div edi
xor edx, edx
add eax, dword [esp + 0x50]
adc edx, dword [esp + 0x54]
cmp edx, dword [ebx + 0xb4]
jne 0x52187d
cmp eax, dword [ebx + 0xb0]
jbe 0x5218b0
jmp 0x52187f
jle 0x5218b0
mov eax, esi
xor edx, edx
div edi
xor edx, edx
add eax, dword [esp + 0x50]
adc edx, dword [esp + 0x54]
mov dword [ebx + 0xb0], eax
mov dword [ebx + 0xb4], edx
cmp dword [0x66aca4], 0
je 0x5218b0
mov eax, dword [0x66aca4]
mov byte [eax + 0x3997], 1
cmp dword [0x66aca4], 0
je 0x5218e2
mov eax, dword [0x66aca4]
cmp byte [eax + 0x3930], 0
jne 0x5218e2
mov eax, dword [0x66aca4]
cmp byte [eax + 0x3997], 0
je 0x5218e2
mov edx, dword [0x66aca4]
mov eax, ebx
call fcn.00518eac
cmp ebp, esi
ja 0x5216bc
cmp edi, ebp
jbe 0x52190e
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
add eax, 1
adc edx, 0
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edx
xor eax, eax
mov dword [ebx + 0xd4], eax
jmp 0x52194e
mov eax, ebp
xor edx, edx
div edi
xor edx, edx
add eax, dword [esp + 0x28]
adc edx, dword [esp + 0x2c]
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edx
sub dword [ebx + 0xd4], ebp
cmp dword [ebx + 0xd4], 0
jbe 0x52194e
mov edx, dword [ebx + 0xc8]
mov eax, dword [ebx + 0xc8]
add eax, ebp
mov ecx, dword [ebx + 0xd4]
call fcn.00402da0
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
cmp edx, dword [esp + 0x14]
jne 0x521968
cmp eax, dword [esp + 0x10]
jb 0x5212f6
jmp 0x52196e
jl 0x5212f6
mov ecx, ebx
mov eax, dword [ecx + 0x90]
mov edx, dword [ecx + 0x94]
cmp edx, dword [ecx + 0x78]
jne 0x521988
cmp eax, dword [ecx + 0x74]
ja 0x5219b0
jmp 0x52198a
jg 0x5219b0
mov eax, dword [ecx + 0x74]
mov edx, dword [ecx + 0x78]
sub eax, dword [ecx + 0x90]
sbb edx, dword [ecx + 0x94]
cmp edx, dword [ecx + 0xac]
jne 0x5219ae
cmp eax, dword [ecx + 0xa8]
jae 0x5219ca
jmp 0x5219b0
jge 0x5219ca
mov eax, dword [ecx + 0x74]
mov edx, dword [ecx + 0x78]
add eax, 1
adc edx, 0
mov dword [ecx + 0xa8], eax
mov dword [ecx + 0xac], edx
jmp 0x5219ea
mov eax, dword [ecx + 0x90]
mov edx, dword [ecx + 0x94]
add eax, dword [esp + 8]
adc edx, dword [esp + 0xc]
mov dword [ecx + 0xa8], eax
mov dword [ecx + 0xac], edx
mov eax, ebx
call fcn.0051ff80
inc dword [ebx + 0xc0]
cmp byte [ebx + 0x1ec], 0
je 0x521a0b
xor ecx, ecx
xor edx, edx
mov eax, ebx
call fcn.00519dd4
mov eax, ebx
call fcn.005202ec
cmp dword [0x66aca4], 0
je 0x521a27
mov eax, dword [0x66aca4]
mov byte [eax + 0x3997], 1
cmp byte [ebx + 0xba], 2
jne 0x521a3b
xor ecx, ecx
mov dl, 1
mov eax, ebx
call fcn.00519dd4
xor edx, edx
mov eax, ebx
call fcn.00519e24
add esp, 0x90
pop ebp
pop edi
pop esi
pop ebx
ret