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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x17c
mov dword [ebp - 0x118], eax
mov dword [ebp - 0x13c], 0
mov eax, dword [ebp - 0x118]
mov eax, dword [eax + 0x74]
cmp dword [eax + 0x14], 0
mov dword [ebp - 0x110], eax
js 0x520319
mov eax, dword [ebp - 0x110]
mov dl, byte [eax + 0xc]
test dl, dl
je 0x52032d
jmp 0x52034d
mov eax, dword [ebp - 0x110]
call fcn.005073f1
test eax, eax
je 0x52030a
jmp 0x521dc2
mov eax, dword [ebp - 0x110]
imul ecx, dword [eax + 0x14], 3
mov eax, dword [ebp - 0x118]
mov eax, dword [eax + 0x14]
mov eax, dword [eax + 0x28]
add eax, eax
cmp ecx, eax
jle 0x521dc2
mov eax, dword [ebp - 0x118]
movsx eax, byte [eax + 0x44]
mov dword [ebp - 0x11c], eax
test eax, eax
jne 0x52051e
test dl, dl
je 0x521dcc
mov eax, dword [ebp - 0x118]
mov eax, dword [eax + 0x14]
mov eax, dword [eax + 8]
test eax, eax
je 0x5203b0
cmp dword [ebp - 0x118], eax
je 0x5203db
cmp byte [eax], 0
jne 0x5203db
mov edi, dword [ebp - 0x118]
mov edi, dword [edi + 0x74]
cmp dword [eax + 0x74], edi
jne 0x5203db
mov eax, 0x12bf4
call fcn.0050711b
mov dword [ebp - 0x11c], eax
test eax, eax
jne 0x521dcc
mov eax, dword [ebp - 0x110]
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x58], 0
mov ebx, dword [eax + 0x34]
mov eax, dword [eax + 0x48]
call fcn.0051c2b3
mov dword [ebp - 0x84], eax
test eax, eax
jne 0x5203e0
jmp 0x52040e
mov eax, dword [eax + 0x18]
jmp 0x520379
mov eax, dword [ebp - 0x118]
mov dword [eax + 0x7c], 0
mov eax, dword [ebp - 0x70]
call fcn.004f2e2b
mov eax, dword [ebp - 0x84]
mov dword [ebp - 0x11c], eax
test eax, eax
jne 0x521dcc
jmp 0x5204f3
mov eax, dword [ebp - 0x110]
mov dword [esp + 4], 0
lea ecx, [ebp - 0x58]
lea edx, [ebp - 0x70]
mov eax, dword [eax + 4]
mov dword [esp], eax
mov eax, ebx
call fcn.0051ed18
mov dword [ebp - 0x84], eax
test eax, eax
jne 0x52044d
mov edx, dword [ebp - 0x70]
mov eax, dword [ebp - 0x110]
lea ecx, [ebp - 0x84]
call fcn.0051f4e0
cmp byte [ebx + 0x11], 0
je 0x520478
lea eax, [ebp - 0x84]
mov edx, dword [ebp - 0x58]
mov ecx, 5
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x110]
mov eax, dword [eax + 4]
mov dword [esp], eax
mov eax, ebx
call fcn.0051f2da
cmp dword [ebp - 0x84], 0
mov eax, dword [ebp - 0x70]
jne 0x5203e0
mov edi, dword [ebp - 0x110]
lea edx, [eax + 0x1c]
movzx ecx, byte [edi + 0xc]
lea esi, [edi + 0x1c]
mov edi, edx
lea edx, [eax + 0x24]
add ecx, ecx
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0x110]
lea esi, [edi + 0x24]
movzx ecx, byte [edi + 0xc]
mov edi, edx
shl ecx, 2
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0x110]
mov dl, byte [edi + 0xc]
mov byte [eax + 0xc], dl
mov eax, dword [eax + 0x38]
movzx edx, byte [eax]
mov eax, edi
and edx, 0xfffffff7
call fcn.005071ee
mov edi, dword [ebp - 0x110]
mov eax, dword [ebp - 0x58]
movzx edx, byte [edi + 9]
mov ecx, dword [edi + 0x38]
bswap eax
mov edi, dword [ebp - 0x118]
mov dword [ecx + edx + 8], eax
mov eax, dword [ebp - 0x70]
mov dword [edi + 0x7c], eax
mov eax, dword [ebp - 0x118]
mov edi, dword [ebp - 0x110]
mov byte [eax + 0x44], 1
mov dword [eax + 0x78], edi
mov edi, dword [ebp - 0x118]
mov dword [eax + 0x46], 0
mov eax, dword [eax + 0x7c]
mov dword [edi + 0x74], eax
jmp 0x5202f5
mov eax, dword [ebp - 0x110]
mov eax, dword [eax + 0x48]
cmp word [eax + 0x1e], 1
jle 0x520543
mov eax, 0x12c30
call fcn.0050711b
mov dword [ebp - 0x11c], eax
jmp 0x521db3
mov edi, dword [ebp - 0x11c]
mov eax, dword [ebp - 0x118]
mov eax, dword [eax + edi*4 + 0x74]
mov dword [ebp - 0x10c], eax
mov eax, dword [ebp - 0x118]
mov bx, word [eax + edi*2 + 0x46]
mov eax, dword [ebp - 0x10c]
mov eax, dword [eax + 0x48]
call fcn.0051c2b3
mov dword [ebp - 0x14c], eax
mov esi, eax
test eax, eax
jne 0x521d7b
mov eax, dword [ebp - 0x10c]
cmp dword [eax + 0x14], 0
js 0x52059f
mov eax, dword [ebp - 0x110]
cmp byte [eax + 2], 0
jne 0x5205b5
jmp 0x52080f
mov eax, dword [ebp - 0x10c]
call fcn.005073f1
mov esi, eax
test eax, eax
je 0x52058e
jmp 0x521d7b
mov eax, dword [ebp - 0x110]
cmp byte [eax + 0xc], 1
jne 0x52080f
mov edi, dword [ebp - 0x110]
mov eax, dword [eax + 0x18]
cmp word [edi + 0x1c], ax
jne 0x52080f
mov edi, dword [ebp - 0x10c]
cmp dword [edi + 4], 1
je 0x52080f
cmp bx, word [edi + 0x18]
jne 0x52080f
test ax, ax
jne 0x520608
mov eax, 0x127b8
call fcn.0050711b
mov esi, eax
jmp 0x521d7b
mov eax, dword [ebp - 0x110]
lea ecx, [ebp - 0x84]
lea edx, [ebp - 0xac]
mov ebx, dword [eax + 0x34]
mov dword [esp + 4], 0
mov dword [esp], 0
mov eax, ebx
call fcn.0051ed18
mov dword [ebp - 0x98], eax
test eax, eax
jne 0x520804
mov eax, dword [ebp - 0x110]
mov eax, dword [eax + 0x24]
mov dword [ebp - 0x70], eax
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x110]
mov dword [esp], eax
call dword [eax + 0x4c]
mov edx, 0xd
mov word [ebp - 0xc0], ax
mov eax, dword [ebp - 0xac]
call fcn.005071ee
mov eax, dword [ebp - 0x110]
xor edx, edx
mov ecx, 1
mov dword [ebp - 0x58], 1
mov dword [ebp - 0x54], eax
lea eax, [ebp - 0x70]
mov dword [ebp - 0x50], eax
lea eax, [ebp - 0xc0]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x110]
mov eax, dword [eax + 0x3c]
mov dword [ebp - 0x30], 2
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0xac]
mov dword [esp], eax
lea eax, [ebp - 0x58]
call fcn.00507db1
mov edx, dword [ebp - 0xac]
test eax, eax
mov dword [ebp - 0x98], eax
je 0x5206d5
mov eax, edx
jmp 0x5207ff
movzx ecx, word [ebp - 0xc0]
mov eax, 0xfffffffe
sub eax, ecx
movzx ecx, word [edx + 0x12]
sub eax, ecx
add eax, dword [ebx + 0x28]
mov dword [edx + 0x14], eax
cmp byte [ebx + 0x11], 0
je 0x52073c
mov eax, dword [ebp - 0x10c]
lea esi, [ebp - 0x98]
mov edx, dword [ebp - 0x84]
mov ecx, 5
mov dword [esp + 4], esi
mov eax, dword [eax + 4]
mov dword [esp], eax
mov eax, ebx
call fcn.0051f2da
mov eax, dword [ebp - 0xac]
mov edi, dword [ebp - 0xc0]
cmp word [eax + 0x10], di
jae 0x52073c
mov dword [esp], esi
mov ecx, dword [ebp - 0x70]
mov edx, eax
call fcn.0051f39e
mov eax, dword [ebp - 0x110]
mov edi, dword [ebp - 0x110]
movzx edx, word [eax + 0x18]
mov eax, dword [eax + 0x40]
movzx eax, word [eax + edx*2 - 2]
xchg al, ah
and ax, word [edi + 0x1a]
movzx eax, ax
add eax, dword [edi + 0x38]
mov dword [ebp - 0x70], eax
add eax, 9
mov edx, dword [ebp - 0x70]
lea ecx, [edx + 1]
mov dword [ebp - 0x70], ecx
cmp byte [edx], 0
jns 0x520778
cmp eax, ecx
ja 0x520766
add edx, 0xa
lea eax, [ebp - 0xdd]
mov ecx, dword [ebp - 0x70]
inc eax
lea ebx, [ecx + 1]
mov dword [ebp - 0x70], ebx
mov cl, byte [ecx]
mov byte [eax - 1], cl
cmp edx, ebx
jbe 0x520798
test cl, cl
js 0x520781
cmp dword [ebp - 0x98], 0
jne 0x5207e0
mov edi, dword [ebp - 0x10c]
lea ebx, [ebp - 0x98]
lea ecx, [ebp - 0xe1]
sub eax, ecx
movzx edx, word [edi + 0x18]
mov edi, dword [ebp - 0x110]
mov dword [esp + 0xc], ebx
mov ebx, dword [edi + 4]
mov dword [esp], eax
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x10c]
mov dword [esp + 8], ebx
call fcn.00520073
mov esi, dword [ebp - 0x10c]
mov eax, dword [ebp - 0x84]
movzx edx, byte [esi + 9]
mov ecx, dword [esi + 0x38]
bswap eax
mov dword [ecx + edx + 8], eax
mov eax, dword [ebp - 0xac]
call fcn.004f2e2b
mov esi, dword [ebp - 0x98]
jmp 0x521d7b
mov eax, dword [ebp - 0x118]
lea esi, [ebp - 0xfd]
mov edi, esi
lea esi, [ebp - 0x58]
mov eax, dword [eax + 0x14]
mov eax, dword [eax + 0x24]
call fcn.004f6161
mov edx, 5
mov dword [ebp - 0x108], 0
mov dword [ebp - 0x140], eax
mov eax, dword [ebp - 0x118]
mov ecx, edx
mov al, byte [eax + 3]
mov byte [ebp - 0x114], al
and eax, 1
mov byte [ebp - 0x150], al
xor eax, eax
cmp dword [ebp - 0x140], 0
rep stosb byte es:[edi], al
mov edi, esi
mov esi, 7
mov edx, ecx
mov ecx, 0x10
mov eax, edx
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x10c]
mov eax, dword [eax + 0x34]
mov dword [ebp - 0x120], eax
je 0x521d5b
mov dword [ebp - 0x128], 0
movzx eax, bx
mov dword [ebp - 0x134], eax
mov eax, dword [ebp - 0x10c]
movzx edx, byte [eax + 0xc]
movzx ecx, word [eax + 0x18]
lea eax, [edx + ecx]
mov dword [ebp - 0x12c], eax
dec eax
jle 0x5208f7
cmp dword [ebp - 0x134], 0
movzx eax, byte [ebp - 0x150]
je 0x5208ea
mov esi, dword [ebp - 0x134]
lea edi, [esi - 1]
mov dword [ebp - 0x128], edi
cmp esi, dword [ebp - 0x12c]
jne 0x5208ea
lea esi, [eax + esi - 2]
mov dword [ebp - 0x128], esi
mov ebx, 2
sub ebx, eax
mov dword [ebp - 0x12c], ebx
mov eax, dword [ebp - 0x12c]
mov edi, dword [ebp - 0x10c]
add eax, dword [ebp - 0x128]
sub eax, edx
mov edx, dword [edi + 0x38]
cmp ecx, eax
jne 0x52091c
movzx eax, byte [edi + 9]
lea eax, [edx + eax + 8]
jmp 0x520934
mov esi, dword [ebp - 0x10c]
mov ecx, dword [esi + 0x40]
movzx eax, word [ecx + eax*2]
xchg al, ah
and ax, word [esi + 0x1a]
movzx eax, ax
add eax, edx
mov dword [ebp - 0x15c], eax
mov eax, dword [ebp - 0x15c]
mov dword [ebp - 0x124], 0
mov eax, dword [eax]
bswap eax
mov dword [ebp - 0x104], eax
mov eax, dword [ebp - 0x12c]
mov dword [ebp - 0x114], eax
mov eax, dword [ebp - 0x114]
mov dword [esp + 4], 0
lea ebx, [ebp - 0xf0]
mov dword [esp], 0
mov edx, dword [ebp - 0x104]
lea esi, [eax*4]
mov eax, dword [ebp - 0x120]
lea ecx, [ebx + esi]
call fcn.00508219
mov dword [ebp - 0x154], eax
mov dword [ebp - 0x108], eax
test eax, eax
je 0x5209bf
mov eax, dword [ebp - 0x114]
lea edx, [ebp - 0xf0]
mov edi, edx
lea ecx, [eax*4 + 4]
xor eax, eax
jmp 0x5209e3
mov eax, dword [ebp - 0x114]
mov eax, dword [ebx + eax*4]
cmp dword [eax + 0x14], 0
jns 0x5209f4
call fcn.005073f1
mov dword [ebp - 0x108], eax
test eax, eax
je 0x5209f4
xor eax, eax
mov edi, ebx
mov ecx, esi
rep stosb byte es:[edi], al
mov dword [ebp - 0x114], 0
jmp 0x521d00
mov eax, dword [ebp - 0x114]
mov esi, dword [ebp - 0x124]
dec dword [ebp - 0x114]
cmp dword [ebp - 0x114], 0xffffffff
mov eax, dword [ebp + eax*4 - 0xf0]
movzx eax, word [eax + 0x18]
lea eax, [esi + eax + 4]
mov dword [ebp - 0x124], eax
je 0x520b83
mov eax, dword [ebp - 0x10c]
mov dl, byte [eax + 0xc]
mov eax, dword [ebp - 0x128]
add eax, dword [ebp - 0x114]
mov dword [ebp - 0x130], eax
mov eax, dword [ebp - 0x10c]
mov eax, dword [eax + 0x4c]
test dl, dl
je 0x520ab1
mov edi, dword [ebp - 0x10c]
movzx ecx, word [edi + 0x1c]
cmp ecx, dword [ebp - 0x130]
jne 0x520ab1
mov edx, dword [edi + 0x24]
mov esi, dword [ebp - 0x114]
mov ecx, dword [edx]
mov dword [ebp + esi*4 - 0xf8], edx
mov dword [esp + 4], edx
bswap ecx
mov dword [esp], edi
mov dword [ebp - 0x104], ecx
call eax
mov esi, dword [ebp - 0x114]
movzx eax, ax
mov dword [ebp + esi*4 - 0x98], eax
mov eax, dword [ebp - 0x10c]
mov byte [eax + 0xc], 0
cmp dword [ebp - 0x108], 0
jne 0x5209a6
jmp 0x520960
mov edi, dword [ebp - 0x10c]
mov ecx, dword [ebp - 0x130]
movzx edx, dl
mov esi, dword [ebp - 0x114]
sub ecx, edx
mov edx, dword [edi + 0x40]
movzx ebx, word [edx + ecx*2]
xchg bl, bh
and bx, word [edi + 0x1a]
movzx ebx, bx
add ebx, dword [edi + 0x38]
mov edx, dword [ebx]
mov dword [ebp + esi*4 - 0xf8], ebx
mov dword [esp + 4], ebx
bswap edx
mov dword [esp], edi
mov dword [ebp - 0x104], edx
call eax
movzx edx, ax
mov eax, dword [ebp - 0x114]
mov dword [ebp + eax*4 - 0x98], edx
mov eax, dword [ebp - 0x120]
test byte [eax + 0x18], 0xc
je 0x520b54
mov esi, dword [ebp - 0x10c]
mov edi, dword [ebp - 0x120]
mov eax, ebx
sub eax, dword [esi + 0x38]
lea ecx, [edx + eax]
cmp ecx, dword [edi + 0x28]
jg 0x520b54
add eax, dword [ebp - 0x140]
mov esi, ebx
mov ecx, edx
mov edi, eax
mov eax, dword [ebp - 0x10c]
rep movsb byte es:[edi], byte [esi]
sub ebx, dword [eax + 0x38]
mov eax, dword [ebp - 0x114]
add ebx, dword [ebp - 0x140]
mov dword [ebp + eax*4 - 0xf8], ebx
mov eax, dword [ebp - 0x10c]
movzx ecx, byte [eax + 0xc]
mov eax, dword [ebp - 0x130]
sub eax, ecx
lea ecx, [ebp - 0x108]
mov dword [esp], ecx
mov ecx, edx
mov edx, eax
mov eax, dword [ebp - 0x10c]
call fcn.005079c9
jmp 0x520a9f
mov ebx, dword [ebp - 0x124]
mov esi, dword [ebp - 0x120]
add ebx, 3
and ebx, 0xfffffffc
imul eax, ebx, 6
add eax, dword [esi + 0x24]
cdq
call fcn.004ecb7d
mov dword [ebp - 0x50], eax
test eax, eax
jne 0x520bb7
mov dword [ebp - 0x108], 7
jmp 0x5209e5
mov dword [ebp - 0x144], 0
lea eax, [eax + ebx*4]
add ebx, ebx
mov dword [ebp - 0x4c], eax
add eax, ebx
mov dword [ebp - 0x158], eax
mov eax, dword [ebp - 0xf0]
mov dword [ebp - 0x114], 0
mov dword [ebp - 0x54], eax
movzx edx, byte [eax + 8]
movzx eax, byte [eax + 2]
lea edi, [edx*4]
mov dword [ebp - 0x124], eax
mov eax, dword [ebp - 0x12c]
mov word [ebp - 0x146], di
inc eax
mov dword [ebp - 0x160], eax
mov eax, dword [ebp - 0x114]
mov ecx, dword [ebp - 0xf0]
mov edx, dword [ebp + eax*4 - 0xf0]
mov ecx, dword [ecx + 0x38]
mov esi, dword [edx + 0x38]
movzx eax, word [edx + 0x18]
mov di, word [edx + 0x1a]
mov cl, byte [ecx]
mov dword [ebp - 0x130], esi
movzx esi, word [edx + 0x12]
mov ebx, eax
add esi, dword [ebp - 0x130]
mov word [ebp - 0x164], di
mov dword [ebp - 0x138], esi
mov esi, dword [ebp - 0x130]
cmp byte [esi], cl
je 0x520c63
mov eax, 0x1295d
jmp 0x52113f
movzx ecx, byte [edx + 0xc]
mov esi, dword [ebp - 0x58]
add ecx, eax
add esi, esi
add esi, dword [ebp - 0x4c]
xor eax, eax
add ecx, ecx
mov edi, esi
rep stosb byte es:[edi], al
mov al, byte [edx + 0xc]
mov byte [ebp - 0x168], al
test al, al
je 0x520d11
movzx ecx, word [edx + 0x1c]
cmp bx, cx
jb 0x520caa
mov eax, dword [ebp - 0x58]
mov edi, dword [ebp - 0x50]
xor ebx, ebx
mov dword [ebp - 0x16c], eax
lea eax, [edi + eax*4]
mov esi, eax
xor eax, eax
jmp 0x520cb4
mov eax, 0x12975
jmp 0x52113f
cmp ecx, ebx
jle 0x520cdb
mov eax, dword [ebp - 0x138]
movzx eax, word [eax + ebx*2]
xchg al, ah
and eax, dword [ebp - 0x164]
movzx eax, ax
add eax, dword [ebp - 0x130]
mov dword [esi + ebx*4], eax
inc ebx
mov al, 1
jmp 0x520cb4
lea ebx, [ecx + ecx]
add ecx, dword [ebp - 0x16c]
add dword [ebp - 0x138], ebx
test al, al
je 0x520cf1
mov dword [ebp - 0x58], ecx
mov ecx, dword [ebp - 0x58]
movzx esi, byte [ebp - 0x168]
xor eax, eax
lea ebx, [edi + ecx*4]
mov edi, dword [edx + eax*4 + 0x24]
mov dword [ebx + eax*4], edi
inc eax
cmp eax, esi
jl 0x520d00
add ecx, esi
mov dword [ebp - 0x58], ecx
movzx eax, word [edx + 0x18]
movzx ecx, word [edx + 0x12]
mov edi, dword [ebp - 0x58]
mov ebx, dword [ebp - 0x138]
add eax, eax
add eax, ecx
mov ecx, dword [ebp - 0x50]
add eax, dword [ebp - 0x130]
lea esi, [ecx + edi*4]
xor ecx, ecx
cmp eax, ebx
jbe 0x520d59
movzx ecx, word [ebx]
add esi, 4
add ebx, 2
xchg cl, ch
and ecx, dword [ebp - 0x164]
movzx ecx, cx
add ecx, dword [ebp - 0x130]
mov dword [esi - 4], ecx
mov cl, 1
jmp 0x520d34
mov esi, dword [ebp - 0x138]
lea ebx, [eax + 1]
sub ebx, dword [ebp - 0x138]
shr ebx, 1
dec esi
cmp eax, esi
mov eax, 0
cmovb ebx, eax
add ebx, edi
test cl, cl
je 0x520d7e
mov dword [ebp - 0x58], ebx
mov eax, dword [ebp - 0x58]
mov edi, dword [ebp - 0x114]
cmp dword [ebp - 0x124], 0
mov dword [ebp + edi*4 - 0xac], eax
sete byte [ebp - 0x138]
cmp dword [ebp - 0x12c], edi
jle 0x520e48
cmp byte [ebp - 0x138], 0
je 0x520e48
mov ecx, dword [ebp + edi*4 - 0x98]
mov ebx, dword [ebp - 0x4c]
mov esi, dword [ebp + edi*4 - 0xf8]
mov word [ebx + eax*2], cx
mov eax, dword [ebp - 0x158]
movzx ecx, cx
add eax, dword [ebp - 0x144]
add dword [ebp - 0x144], ecx
mov edi, eax
movzx ebx, word [ebp - 0x146]
rep movsb byte es:[edi], byte [esi]
mov si, word [ebp - 0x146]
add eax, ebx
mov ecx, dword [ebp - 0x58]
mov ebx, dword [ebp - 0x50]
mov dword [ebx + ecx*4], eax
add ecx, ecx
add ecx, dword [ebp - 0x4c]
sub word [ecx], si
cmp byte [edx + 8], 0
jne 0x520e14
mov edx, dword [edx + 0x38]
mov edx, dword [edx + 8]
mov dword [eax], edx
jmp 0x520e45
mov edx, dword [ebp - 0x58]
mov eax, dword [ebp - 0x4c]
cmp word [eax + edx*2], 3
ja 0x520e45
mov eax, dword [ebp - 0x158]
inc dword [ebp - 0x144]
mov edi, dword [ebp - 0x144]
mov byte [eax + edi - 1], 0
mov eax, dword [ebp - 0x58]
add eax, eax
add eax, dword [ebp - 0x4c]
inc word [eax]
jmp 0x520e14
inc dword [ebp - 0x58]
inc dword [ebp - 0x114]
mov eax, dword [ebp - 0x114]
cmp eax, dword [ebp - 0x160]
jne 0x520c0d
mov edi, dword [ebp - 0x120]
movzx eax, word [ebp - 0x146]
xor ebx, ebx
xor esi, esi
mov edx, dword [edi + 0x28]
lea eax, [eax + edx - 0xc]
mov dword [ebp - 0x158], eax
mov edi, dword [ebp + esi*4 - 0xf0]
mov ecx, dword [ebp + esi*4 - 0xac]
mov eax, dword [edi + 0x3c]
mov dword [ebp + ebx*4 - 0x30], ecx
mov dword [ebp + ebx*4 - 0x48], eax
test ebx, ebx
je 0x520ea5
lea eax, [ebx - 1]
cmp ecx, dword [ebp + ebx*4 - 0x34]
cmove ebx, eax
cmp dword [ebp - 0x124], 0
jne 0x520ec3
mov eax, dword [ebp - 0x10c]
inc ebx
mov eax, dword [eax + 0x3c]
mov dword [ebp + ebx*4 - 0x48], eax
lea eax, [ecx + 1]
mov dword [ebp + ebx*4 - 0x30], eax
mov eax, dword [ebp - 0x158]
sub eax, dword [edi + 0x14]
xor edx, edx
mov dword [ebp + esi*4 - 0x98], eax
movzx eax, byte [edi + 0xc]
cmp edx, eax
jge 0x520f1b
mov eax, dword [edi + edx*4 + 0x24]
mov dword [ebp - 0x130], ecx
mov dword [ebp - 0x114], edx
mov dword [esp + 4], eax
mov dword [esp], edi
call dword [edi + 0x4c]
mov ecx, dword [ebp + esi*4 - 0x98]
mov edx, dword [ebp - 0x114]
movzx eax, ax
lea eax, [eax + ecx + 2]
inc edx
mov ecx, dword [ebp - 0x130]
mov dword [ebp + esi*4 - 0x98], eax
jmp 0x520ed5
mov dword [ebp + esi*4 - 0xc0], ecx
inc ebx
inc esi
cmp esi, dword [ebp - 0x160]
jne 0x520e7e
mov eax, dword [ebp - 0x12c]
lea esi, [ebp - 0x98]
xor ebx, ebx
inc eax
mov dword [ebp - 0x144], eax
mov dword [ebp - 0x130], eax
mov eax, dword [esi]
mov dword [ebp - 0x114], eax
cmp dword [ebp - 0x158], eax
jge 0x521026
lea eax, [ebx + 1]
cmp dword [ebp - 0x130], eax
jg 0x520f93
lea eax, [ebx + 2]
mov dword [ebp - 0x130], eax
cmp ebx, 4
jne 0x520f82
mov eax, 0x129da
jmp 0x52113f
mov eax, dword [ebp - 0x58]
mov dword [esi + 4], 0
mov dword [ebp + ebx*4 - 0xbc], eax
mov ecx, dword [ebp + ebx*4 - 0xc0]
lea eax, [ebp - 0x58]
lea edi, [ecx - 1]
mov dword [ebp - 0x164], ecx
mov edx, edi
call fcn.004c8348
mov edx, dword [ebp - 0x114]
movzx eax, ax
add eax, 2
sub edx, eax
cmp dword [ebp - 0x124], 0
mov dword [esi], edx
jne 0x520fe3
mov ecx, dword [ebp - 0x164]
xor eax, eax
cmp ecx, dword [ebp - 0x58]
jge 0x520fe3
mov edx, ecx
lea eax, [ebp - 0x58]
call fcn.004c8348
movzx eax, ax
add eax, 2
add dword [esi + 4], eax
mov dword [ebp + ebx*4 - 0xc0], edi
jmp 0x520f4b
mov edx, edi
lea eax, [ebp - 0x58]
call fcn.004c8348
mov edx, dword [esi]
movzx eax, ax
add eax, 2
add edx, eax
cmp dword [ebp - 0x158], edx
jl 0x52104b
mov dword [esi], edx
cmp dword [ebp - 0x124], 0
lea edx, [edi + 1]
mov dword [ebp + ebx*4 - 0xc0], edx
je 0x521034
sub dword [esi + 4], eax
mov edi, dword [ebp + ebx*4 - 0xc0]
cmp edi, dword [ebp - 0x58]
jl 0x520ff2
jmp 0x521050
xor eax, eax
cmp edx, dword [ebp - 0x58]
jge 0x521023
lea eax, [ebp - 0x58]
call fcn.004c8348
movzx eax, ax
add eax, 2
jmp 0x521023
cmp edi, dword [ebp - 0x58]
jl 0x52105b
lea eax, [ebx + 1]
mov dword [ebp - 0x130], eax
jmp 0x521076
xor eax, eax
test ebx, ebx
je 0x521068
mov eax, dword [ebp + ebx*4 - 0xc4]
cmp edi, eax
jg 0x521076
mov eax, 0x129fb
jmp 0x52113f
inc ebx
add esi, 4
cmp ebx, dword [ebp - 0x130]
jl 0x520f4b
mov eax, dword [ebp - 0x130]
dec eax
mov dword [ebp - 0x168], eax
mov ebx, eax
test ebx, ebx
je 0x5211ae
mov eax, dword [ebp + ebx*4 - 0x9c]
mov edx, dword [ebp + ebx*4 - 0xc4]
mov edi, dword [ebp + ebx*4 - 0x98]
mov dword [ebp - 0x114], eax
lea esi, [edx - 1]
lea eax, [ebp - 0x58]
sub edx, dword [ebp - 0x124]
mov dword [ebp - 0x164], edx
call fcn.004c8348
xor eax, eax
cmp dword [ebp - 0x168], ebx
mov edx, dword [ebp - 0x164]
setne al
add eax, eax
mov dword [ebp - 0x16c], eax
lea eax, [edx + edx]
mov dword [ebp - 0x164], eax
mov edx, esi
lea eax, [ebp - 0x58]
call fcn.004c8348
test edi, edi
je 0x521176
cmp byte [ebp - 0x150], 0
je 0x52114f
mov eax, dword [ebp - 0x114]
mov dword [ebp + ebx*4 - 0x98], edi
mov edx, dword [ebp + ebx*4 - 0xc4]
mov dword [ebp + ebx*4 - 0x9c], eax
xor eax, eax
cmp ebx, 1
je 0x521131
mov eax, dword [ebp + ebx*4 - 0xc8]
dec ebx
cmp edx, eax
jg 0x521095
mov eax, 0x12a25
call fcn.0050711b
mov dword [ebp - 0x108], eax
jmp 0x5209e5
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x164]
movzx edx, word [eax + ecx]
movzx eax, word [eax + esi*2]
add eax, dword [ebp - 0x16c]
lea ecx, [edi + edx + 1]
mov edx, dword [ebp - 0x114]
sub edx, eax
cmp ecx, edx
jge 0x521108
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x164]
sub dword [ebp - 0x164], 2
movzx edx, word [eax + ecx]
movzx eax, word [eax + esi*2]
mov dword [ebp + ebx*4 - 0xc4], esi
add eax, 2
lea edi, [edi + edx + 2]
sub dword [ebp - 0x114], eax
dec esi
jns 0x5210f1
jmp 0x521108
mov eax, dword [ebp - 0xf0]
mov eax, dword [eax + 0x38]
movzx esi, byte [eax]
mov eax, esi
mov byte [ebp - 0x164], al
cmp dword [ebp - 0x144], ebx
jle 0x521241
mov eax, dword [ebp + ebx*4 - 0xf0]
lea edi, [ebx + 1]
mov dword [ebp + ebx*4 - 0xf0], 0
mov dword [ebp + ebx*4 - 0xd4], eax
mov dword [ebp - 0x70], eax
mov eax, dword [eax + 0x48]
call fcn.0051c2b3
mov edx, dword [ebp - 0x70]
mov dword [ebp - 0x114], edi
mov dword [ebp - 0x108], eax
mov edx, dword [edx + 0x48]
movsx ecx, word [edx + 0x1e]
mov edx, dword [ebp - 0x134]
sub edx, dword [ebp - 0x128]
cmp edx, ebx
sete dl
movzx edx, dl
inc edx
cmp ecx, edx
je 0x5212d6
test eax, eax
jne 0x5212d6
mov eax, 0x12a46
call fcn.0050711b
mov dword [ebp - 0x108], eax
jmp 0x5212d6
cmp byte [ebp - 0x150], 0
mov eax, 1
jne 0x521255
mov eax, dword [ebp - 0x104]
mov dword [esp], eax
mov eax, dword [ebp - 0x120]
lea ecx, [ebp - 0x104]
lea edx, [ebp - 0x70]
mov dword [esp + 4], 0
call fcn.0051ed18
mov dword [ebp - 0x108], eax
test eax, eax
jne 0x5212fa
mov eax, dword [ebp - 0x70]
mov edx, esi
lea edi, [ebx + 1]
call fcn.005071ee
mov dword [ebp - 0x114], edi
mov edx, dword [ebp - 0x58]
mov edi, dword [ebp - 0x120]
mov eax, dword [ebp - 0x70]
mov dword [ebp + ebx*4 - 0xac], edx
cmp byte [edi + 0x11], 0
mov dword [ebp + ebx*4 - 0xd4], eax
je 0x5212e3
mov edx, dword [eax + 4]
lea eax, [ebp - 0x108]
mov ecx, 5
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10c]
mov eax, dword [eax + 4]
mov dword [esp], eax
mov eax, edi
call fcn.0051f2da
cmp dword [ebp - 0x108], 0
jne 0x521d00
mov edi, dword [ebp - 0x114]
inc ebx
cmp dword [ebp - 0x130], edi
jg 0x5211c2
xor eax, eax
jmp 0x521305
mov dword [ebp - 0x114], ebx
jmp 0x521d00
mov edx, dword [ebp + eax*4 - 0xd4]
mov edx, dword [edx + 4]
mov dword [ebp + eax*4 - 0x84], edx
inc eax
cmp eax, dword [ebp - 0x114]
jne 0x521305
xor eax, eax
mov esi, dword [ebp - 0x114]
lea edx, [esi - 1]
cmp eax, edx
jge 0x521404
lea esi, [eax + 1]
mov edx, eax
mov dword [ebp - 0x130], esi
mov ecx, esi
cmp ecx, dword [ebp - 0x114]
je 0x521361
mov esi, dword [ebp + ecx*4 - 0xd4]
mov ebx, dword [ebp + edx*4 - 0xd4]
mov edi, dword [ebx + 4]
cmp dword [esi + 4], edi
cmovb edx, ecx
inc ecx
jmp 0x52133f
cmp eax, edx
je 0x5213f9
mov eax, dword [ebp - 0x130]
mov ebx, dword [ebp + edx*4 - 0xd4]
xor edx, edx
mov edi, dword [ebp - 0x120]
mov esi, dword [ebp + eax*4 - 0xd8]
mov eax, dword [esi + 4]
mov dword [ebp - 0x134], eax
mov eax, dword [ebx + 4]
mov dword [ebp - 0x150], eax
mov eax, dword [0x660ba8]
div dword [edi + 0x24]
mov edi, dword [ebx + 0x48]
mov edi, dword [edi + 0x1c]
lea edx, [eax + 1]
mov eax, dword [esi + 0x48]
mov ecx, dword [eax + 0x1c]
mov word [eax + 0x1c], di
mov dword [ebp - 0x168], ecx
call fcn.004ba973
mov eax, dword [ebx + 0x48]
mov ecx, dword [ebp - 0x168]
mov edx, dword [ebp - 0x134]
mov word [eax + 0x1c], cx
call fcn.004ba973
mov eax, dword [esi + 0x48]
mov edx, dword [ebp - 0x150]
mov word [eax + 0x1c], di
call fcn.004ba973
mov eax, dword [ebp - 0x150]
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x134]
mov dword [ebx + 4], eax
mov eax, dword [ebp - 0x130]
jmp 0x521321
mov edx, dword [ebp + edx*4 - 0xd4]
mov esi, dword [ebp - 0x15c]
mov eax, dword [edx + 4]
bswap eax
mov dword [esi], eax
test byte [ebp - 0x164], 8
jne 0x521458
mov esi, dword [ebp - 0x114]
cmp dword [ebp - 0x144], esi
je 0x521458
lea eax, [ebp - 0xd8]
cmp dword [ebp - 0x144], esi
jl 0x521443
lea eax, [ebp - 0xf4]
mov esi, dword [ebp - 0x160]
mov edx, dword [edx + 0x38]
mov eax, dword [eax + esi*4]
mov eax, dword [eax + 0x38]
mov eax, dword [eax + 8]
mov dword [edx + 8], eax
mov eax, dword [ebp - 0x120]
cmp byte [eax + 0x11], 0
jne 0x521485
movzx eax, word [ebp - 0x146]
mov edi, 1
mov dword [ebp - 0x160], 0
mov dword [ebp - 0x168], eax
jmp 0x52163c
mov ebx, dword [ebp - 0xd4]
xor esi, esi
mov dword [ebp - 0x130], 0
mov dword [ebp - 0x150], 0
movzx edx, word [ebx + 0x18]
movzx eax, byte [ebx + 0xc]
mov edi, ebx
add eax, edx
mov dword [ebp - 0x15c], eax
movzx eax, byte [ebp - 0x138]
mov dword [ebp - 0x160], eax
cmp esi, dword [ebp - 0x58]
jge 0x521464
mov eax, dword [ebp - 0x50]
mov eax, dword [eax + esi*4]
mov dword [ebp - 0x134], eax
cmp esi, dword [ebp - 0x15c]
jne 0x52151b
inc dword [ebp - 0x130]
mov eax, dword [ebp - 0x130]
cmp eax, dword [ebp - 0x114]
jge 0x5214f6
mov ebx, dword [ebp + eax*4 - 0xd4]
jmp 0x521503
mov eax, dword [ebp - 0x130]
mov ebx, dword [ebp + eax*4 - 0xf0]
movzx eax, word [ebx + 0x18]
movzx edx, byte [ebx + 0xc]
add eax, edx
add eax, dword [ebp - 0x160]
add dword [ebp - 0x15c], eax
jmp 0x5214d1
mov eax, dword [ebp - 0x150]
cmp esi, dword [ebp + eax*4 - 0xc0]
jne 0x52154a
inc dword [ebp - 0x150]
mov eax, dword [ebp - 0x150]
cmp dword [ebp - 0x124], 0
mov edi, dword [ebp + eax*4 - 0xd4]
je 0x5215e3
mov ecx, dword [ebp - 0x114]
cmp dword [ebp - 0x130], ecx
jge 0x52157a
mov eax, dword [ebp - 0x130]
mov eax, dword [ebp + eax*4 - 0x84]
cmp dword [edi + 4], eax
jne 0x52157a
mov eax, dword [ebp - 0x134]
cmp dword [ebx + 0x38], eax
ja 0x52157a
cmp dword [ebx + 0x3c], eax
ja 0x5215e3
cmp word [ebp - 0x146], 0
jne 0x5215ae
mov eax, dword [ebp - 0x134]
mov ecx, 5
mov edx, dword [eax]
lea eax, [ebp - 0x108]
mov dword [esp + 4], eax
mov eax, dword [edi + 4]
bswap edx
mov dword [esp], eax
mov eax, dword [ebp - 0x120]
call fcn.0051f2da
mov edx, esi
lea eax, [ebp - 0x58]
call fcn.004c8348
cmp ax, word [edi + 0x10]
jbe 0x5215d6
lea eax, [ebp - 0x108]
mov ecx, dword [ebp - 0x134]
mov edx, ebx
mov dword [esp], eax
mov eax, edi
call fcn.0051f39e
cmp dword [ebp - 0x108], 0
jne 0x521d00
inc esi
jmp 0x5214c0
mov edx, dword [ebp + edx*4 - 0x48]
cmp ecx, edx
jbe 0x52175b
mov eax, dword [ebp - 0x128]
lea esi, [ebp - 0x108]
mov dword [esp + 0xc], esi
mov ebx, dword [ebx + 4]
lea edx, [eax + edi - 1]
mov eax, dword [ebp - 0x134]
inc edi
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x130]
mov dword [esp], eax
mov eax, dword [ebp - 0x10c]
call fcn.00520073
cmp dword [ebp - 0x108], 0
jne 0x521d00
cmp dword [ebp - 0x114], edi
je 0x521781
mov esi, dword [ebp + edi*4 - 0xc4]
mov eax, dword [ebp - 0x50]
mov ebx, dword [ebp + edi*4 - 0xd8]
mov edx, dword [ebp - 0x140]
mov dword [ebp - 0x150], eax
lea eax, [esi*4]
add edx, dword [ebp - 0x160]
mov dword [ebp - 0x164], eax
mov eax, dword [ebp - 0x150]
mov dword [ebp - 0x134], edx
mov ecx, dword [eax + esi*4]
mov eax, dword [ebp - 0x4c]
movzx eax, word [eax + esi*2]
mov word [ebp - 0x15c], ax
add eax, dword [ebp - 0x168]
cmp byte [ebx + 8], 0
mov dword [ebp - 0x130], eax
jne 0x5216b4
mov edx, dword [ebx + 0x38]
mov eax, dword [ecx]
mov dword [edx + 8], eax
jmp 0x521740
cmp dword [ebp - 0x124], 0
je 0x52170e
lea eax, [ebp - 0x70]
mov ecx, dword [ebp - 0x150]
dec esi
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x164]
mov eax, dword [ecx + eax - 4]
mov dword [esp], ebx
mov dword [esp + 4], eax
call dword [ebx + 0x50]
mov eax, dword [ebp - 0x134]
mov ecx, dword [ebp - 0x6c]
mov edx, dword [ebp - 0x70]
add eax, 4
call fcn.004e6157
mov ecx, dword [ebp - 0x134]
mov dword [ebp - 0x134], 0
add eax, 4
mov dword [ebp - 0x130], eax
jmp 0x521740
sub ecx, 4
cmp word [ebp - 0x15c], 4
jne 0x521740
mov eax, dword [ebp - 0x10c]
mov dword [esp + 4], ecx
mov dword [ebp - 0x150], ecx
mov dword [esp], eax
call dword [eax + 0x4c]
mov ecx, dword [ebp - 0x150]
movzx eax, ax
mov dword [ebp - 0x130], eax
mov edx, dword [ebp - 0x130]
add dword [ebp - 0x160], edx
xor edx, edx
cmp dword [ebp + edx*4 - 0x30], esi
jg 0x5215e9
inc edx
jmp 0x52174e
mov eax, dword [ebp - 0x130]
lea esi, [ecx + eax]
cmp edx, esi
jae 0x5215f5
mov eax, 0x12b0e
call fcn.0050711b
mov dword [ebp - 0x108], eax
jmp 0x521d00
mov eax, 1
sub eax, dword [ebp - 0x114]
mov dword [ebp - 0x150], eax
movzx eax, byte [ebp - 0x138]
mov dword [ebp - 0x174], eax
mov eax, dword [ebp - 0x150]
mov edi, dword [ebp - 0x150]
sar eax, 0x1f
xor edi, eax
mov dword [ebp - 0x130], edi
sub dword [ebp - 0x130], eax
mov eax, dword [ebp - 0x130]
cmp byte [ebp + eax - 0xfd], 0
jne 0x521c09
cmp dword [ebp - 0x150], 0
jns 0x5217ee
mov esi, dword [ebp + eax*4 - 0xc4]
cmp dword [ebp + eax*4 - 0xb0], esi
jge 0x521812
jmp 0x521c09
jne 0x521812
mov dword [ebp - 0x134], 0
mov eax, dword [ebp - 0xc0]
mov dword [ebp - 0x124], 0
mov dword [ebp - 0x128], eax
jmp 0x52186d
mov eax, dword [ebp - 0x130]
mov edi, dword [ebp - 0x130]
dec eax
cmp dword [ebp - 0x144], edi
jle 0x52183c
mov edi, dword [ebp - 0x174]
add edi, dword [ebp + eax*4 - 0xac]
mov dword [ebp - 0x134], edi
jmp 0x521845
mov esi, dword [ebp - 0x58]
mov dword [ebp - 0x134], esi
mov edi, dword [ebp - 0x174]
add edi, dword [ebp + eax*4 - 0xc0]
mov eax, dword [ebp - 0x130]
mov dword [ebp - 0x124], edi
mov eax, dword [ebp + eax*4 - 0xc0]
sub eax, edi
mov dword [ebp - 0x128], eax
mov eax, dword [ebp - 0x130]
mov esi, dword [ebp - 0x124]
add esi, dword [ebp - 0x128]
mov ebx, dword [ebp + eax*4 - 0xd4]
mov eax, dword [ebx + 0x38]
movzx edi, word [ebx + 0x18]
mov dword [ebp - 0x138], eax
mov al, byte [ebx + 9]
mov byte [ebp - 0x164], al
mov eax, dword [ebp - 0x128]
add eax, eax
add eax, dword [ebx + 0x40]
mov dword [ebp - 0x15c], eax
mov eax, dword [ebp - 0x134]
lea ecx, [eax + edi]
movzx eax, byte [ebx + 0xc]
add eax, ecx
mov dword [ebp - 0x160], eax
mov eax, dword [ebp - 0x134]
cmp eax, dword [ebp - 0x124]
jge 0x521929
mov ecx, dword [ebp - 0x124]
mov edx, dword [ebp - 0x134]
sub ecx, eax
lea eax, [ebp - 0x58]
mov dword [esp], eax
mov eax, ebx
call fcn.00507730
mov edx, eax
cmp edi, eax
jge 0x521900
mov eax, 0x12747
call fcn.0050711b
jmp 0x521bdb
mov ecx, dword [ebx + 0x40]
lea eax, [edi + edi]
mov dword [ebp - 0x168], edx
mov dword [esp + 8], eax
lea eax, [edx + edx]
add eax, ecx
mov dword [esp], ecx
mov dword [esp + 4], eax
call sub.msvcrt.dll_memmove
mov edx, dword [ebp - 0x168]
sub edi, edx
cmp dword [ebp - 0x160], esi
jle 0x52194a
lea eax, [ebp - 0x58]
mov ecx, dword [ebp - 0x160]
mov edx, esi
mov dword [esp], eax
mov eax, ebx
sub ecx, esi
call fcn.00507730
sub edi, eax
movzx eax, byte [ebp - 0x164]
mov dword [ebp - 0x160], eax
mov eax, dword [ebp - 0x138]
mov esi, dword [ebp - 0x160]
lea eax, [eax + esi + 5]
mov dword [ebp - 0x16c], eax
mov eax, dword [ebp - 0x138]
lea eax, [eax + esi + 6]
mov dword [ebp - 0x170], eax
mov eax, dword [ebp - 0x16c]
mov esi, dword [ebp - 0x170]
movzx eax, byte [eax]
movzx edx, byte [esi]
mov esi, dword [ebp - 0x138]
shl eax, 8
or eax, edx
dec eax
movzx eax, ax
lea eax, [esi + eax + 1]
mov dword [ebp - 0x70], eax
cmp dword [ebp - 0x15c], eax
jbe 0x5219c0
mov esi, dword [ebp - 0x124]
mov edi, dword [ebp - 0x128]
add esi, esi
jmp 0x521bc0
cmp eax, dword [ebx + 0x3c]
ja 0x5219ad
mov esi, dword [ebp - 0x124]
cmp dword [ebp - 0x134], esi
jle 0x521a45
mov esi, dword [ebp - 0x134]
sub esi, dword [ebp - 0x124]
lea eax, [edi + edi]
cmp esi, dword [ebp - 0x128]
cmovg esi, dword [ebp - 0x128]
mov edx, dword [ebx + 0x40]
mov dword [esp + 8], eax
lea eax, [esi + esi]
add eax, edx
mov dword [esp + 4], edx
mov dword [esp], eax
mov dword [ebp - 0x164], edx
call sub.msvcrt.dll_memmove
lea eax, [ebp - 0x58]
mov dword [esp + 8], esi
lea ecx, [ebp - 0x70]
mov edx, dword [ebp - 0x164]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x124]
mov dword [esp], edx
mov edx, dword [ebp - 0x15c]
mov dword [esp + 4], eax
mov eax, ebx
call fcn.00507f82
test eax, eax
jne 0x5219ad
add edi, esi
mov dword [ebp - 0x164], 0
mov esi, dword [ebx + 0x40]
movzx eax, byte [ebx + 0xc]
cmp dword [ebp - 0x164], eax
jge 0x521afb
mov eax, dword [ebp - 0x164]
movzx eax, word [ebx + eax*2 + 0x1c]
add eax, dword [ebp - 0x134]
mov dword [ebp - 0x168], eax
sub eax, dword [ebp - 0x124]
js 0x521af0
cmp dword [ebp - 0x128], eax
jle 0x521af0
lea edx, [eax + eax]
add esi, edx
cmp eax, edi
jge 0x521aab
mov edx, edi
mov dword [esp + 4], esi
sub edx, eax
lea eax, [esi + 2]
add edx, edx
mov dword [esp], eax
mov dword [esp + 8], edx
call sub.msvcrt.dll_memmove
lea ecx, [ebp - 0x58]
mov edx, dword [ebp - 0x168]
inc edi
mov eax, ecx
call fcn.004c8348
mov eax, dword [ebp - 0x168]
lea ecx, [ebp - 0x58]
mov dword [esp], esi
mov dword [esp + 0xc], ecx
mov edx, dword [ebp - 0x15c]
lea ecx, [ebp - 0x70]
mov dword [esp + 4], eax
mov eax, ebx
mov dword [esp + 8], 1
call fcn.00507f82
test eax, eax
jne 0x5219ad
inc dword [ebp - 0x164]
jmp 0x521a4f
lea eax, [ebp - 0x58]
mov edx, dword [ebp - 0x15c]
lea ecx, [ebp - 0x70]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x128]
sub eax, edi
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x124]
add eax, edi
mov dword [esp + 4], eax
lea eax, [edi + edi]
add esi, eax
mov eax, ebx
mov dword [esp], esi
call fcn.00507f82
test eax, eax
jne 0x5219ad
mov eax, dword [ebp - 0x128]
mov edi, dword [ebp - 0x138]
mov byte [ebx + 0xc], 0
mov esi, dword [ebp - 0x160]
mov word [ebx + 0x18], ax
mov eax, dword [ebp - 0x128]
mov byte [edi + esi + 3], ah
mov eax, dword [ebx + 0x18]
mov byte [edi + esi + 4], al
mov eax, dword [ebp - 0x70]
sub eax, edi
mov edi, dword [ebp - 0x16c]
mov byte [edi], ah
mov edi, dword [ebp - 0x170]
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp - 0x138]
mov byte [edi], al
mov dword [ebp - 0x108], 0
jmp 0x521be9
mov edx, dword [ebp - 0x4c]
add edx, esi
cmp word [edx], 0
mov dword [ebp - 0x134], edx
jne 0x521bbc
mov ecx, dword [ebp - 0x50]
mov eax, dword [ebp - 0x54]
mov ecx, dword [ecx + esi*2]
mov dword [esp], eax
mov dword [esp + 4], ecx
call dword [eax + 0x4c]
mov edx, dword [ebp - 0x134]
mov word [edx], ax
dec edi
add esi, 2
test edi, edi
jg 0x521b8f
mov dword [esp], ebx
mov ecx, dword [ebp - 0x128]
lea eax, [ebp - 0x58]
mov edx, dword [ebp - 0x124]
call fcn.00507db1
mov dword [ebp - 0x108], eax
test eax, eax
jne 0x521d00
mov eax, dword [ebp - 0x130]
mov edi, eax
mov byte [ebp + eax - 0xfd], 1
mov eax, dword [ebp - 0x158]
sub eax, dword [ebp + edi*4 - 0x98]
mov dword [ebx + 0x14], eax
inc dword [ebp - 0x150]
mov eax, dword [ebp - 0x150]
cmp eax, dword [ebp - 0x114]
jne 0x52179f
cmp dword [ebp - 0x11c], 1
jne 0x521c82
mov eax, dword [ebp - 0x10c]
cmp word [eax + 0x18], 0
jne 0x521c82
mov ebx, dword [ebp - 0xd4]
movzx eax, byte [eax + 9]
cmp eax, dword [ebx + 0x14]
jg 0x521c82
or edx, 0xffffffff
mov eax, ebx
call fcn.00507ab7
mov dword [ebp - 0x108], eax
test eax, eax
jne 0x521c6d
mov edx, dword [ebp - 0x10c]
lea ecx, [ebp - 0x108]
mov eax, ebx
call fcn.0051f4e0
lea edx, [ebp - 0x108]
mov eax, ebx
call fcn.00520051
mov ebx, dword [ebp - 0x114]
jmp 0x521ce3
mov eax, dword [ebp - 0x120]
cmp byte [eax + 0x11], 0
je 0x521c7a
cmp word [ebp - 0x146], 0
jne 0x521c7a
mov eax, dword [ebp - 0x154]
lea ecx, [ebp - 0x108]
mov eax, dword [ebp + eax*4 - 0xd4]
mov edx, dword [eax + 0x38]
mov edx, dword [edx + 8]
mov dword [esp + 4], ecx
mov ecx, 5
mov eax, dword [eax + 4]
bswap edx
mov dword [esp], eax
mov eax, dword [ebp - 0x120]
call fcn.0051f2da
inc dword [ebp - 0x154]
mov eax, dword [ebp - 0x154]
cmp eax, dword [ebp - 0x114]
jne 0x521c98
jmp 0x521c7a
cmp dword [ebp - 0x144], ebx
jle 0x521d00
mov eax, dword [ebp + ebx*4 - 0xf0]
lea edx, [ebp - 0x108]
inc ebx
call fcn.00520051
jmp 0x521ce3
mov eax, dword [ebp - 0x50]
mov dword [esp], 0
xor esi, esi
mov dword [esp + 4], eax
call fcn.004e244d
mov ebx, dword [ebp - 0x12c]
inc ebx
mov eax, dword [ebp + esi*4 - 0xf0]
inc esi
call fcn.004f2e2b
cmp esi, ebx
jne 0x521d1c
mov ebx, dword [ebp - 0x114]
cmp dword [ebp - 0x14c], ebx
je 0x521d55
mov eax, dword [ebp - 0x14c]
mov eax, dword [ebp + eax*4 - 0xd4]
call fcn.004f2e2b
inc dword [ebp - 0x14c]
jmp 0x521d2d
mov esi, dword [ebp - 0x108]
cmp dword [ebp - 0x13c], 0
je 0x521d6f
mov eax, dword [ebp - 0x13c]
call fcn.004e3d45
mov eax, dword [ebp - 0x140]
mov dword [ebp - 0x13c], eax
mov eax, dword [ebp - 0x110]
mov byte [eax + 0xc], 0
call fcn.004f2e2b
mov eax, dword [ebp - 0x118]
mov ebx, dword [ebp - 0x118]
mov dword [ebp - 0x11c], esi
mov al, byte [eax + 0x44]
mov byte [ebp - 0x10c], al
dec eax
mov byte [ebx + 0x44], al
movsx eax, al
mov eax, dword [ebx + eax*4 + 0x78]
mov dword [ebx + 0x74], eax
cmp dword [ebp - 0x11c], 0
je 0x5202f5
jmp 0x521dcc
mov dword [ebp - 0x11c], 0
cmp dword [ebp - 0x13c], 0
je 0x521de0
mov eax, dword [ebp - 0x13c]
call fcn.004e3d45
mov eax, dword [ebp - 0x11c]
add esp, 0x17c
pop ebx
pop esi
pop edi
pop ebp
ret