Function at 0x501a50
Capabilities:
Access peb ldr_data
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x52fef5
push eax
mov eax, 0x27cc
mov dword fs:[0], esp
call fcn.00515b70
push ebx
push ebp
push esi
mov ebx, ecx
push edi
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0xfc]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x28]
mov dword [esp + 0x64], ebx
stosb byte es:[edi], al
call fcn.0050f0a0
mov ecx, dword [ebx + 0x10]
mov eax, dword [ebx + 0x14]
lea esi, [ebx + 0xc]
push ecx
push eax
push eax
mov dword [esp + 0x27f0], 0
call fcn.00502e90
add esp, 0xc
mov edi, eax
mov eax, dword [esi + 8]
mov ecx, esi
push eax
push edi
call fcn.004e66d0
mov dword [esi + 8], edi
mov eax, dword [ebx + 4]
push eax
push 2
lea ecx, [esp + 0x30]
call fcn.0050f110
test eax, eax
je 0x502e18
lea ecx, [esp + 0x2d4]
call fcn.004cf820
mov cl, byte [esp + 0x13]
push 0
mov byte [esp + 0x18], cl
lea ecx, [esp + 0x18]
mov byte [esp + 0x27e8], 1
call fcn.00405cc0
mov edi, 0x55802c
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
lea ecx, [esp + 0x18]
push ebp
call fcn.00408220
test al, al
je 0x501b47
mov edi, dword [esp + 0x18]
mov ecx, ebp
mov edx, ecx
mov esi, 0x55802c
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x18]
call fcn.00408200
xor esi, esi
mov byte [esp + 0x27e4], 2
cmp word [esp + 0x30], si
mov dword [esp + 0x24], esi
jbe 0x502dd3
mov ecx, dword [ebx + 8]
call fcn.004c07f0
cmp eax, 0x28
jne 0x501b80
cmp dword [esp + 0x24], 4
jne 0x501b80
push 2
mov ecx, 0x55b398
call fcn.00495480
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0x28]
push eax
call fcn.0050f100
mov eax, dword [esp + 0x44]
mov edx, dword [esp + 0x3c]
and eax, 0xffff
push 0
lea ecx, [eax*8]
sub ecx, eax
mov eax, dword [edx + ecx*4 + 0x14]
mov ecx, dword [ebx + 8]
push eax
call fcn.004c15d0
mov eax, dword [esp + 0x44]
mov edx, dword [esp + 0x3c]
and eax, 0xffff
lea ecx, [eax*8]
sub ecx, eax
mov eax, dword [edx + ecx*4]
cmp eax, 0xffffffff
je 0x502a81
mov ecx, dword [ebx + 4]
push ecx
push eax
lea ecx, [esp + 0x2dc]
call fcn.004cffe0
cmp eax, 0xffffffff
mov dword [esp + 0x7c], eax
je 0x502a81
xor ebp, ebp
mov word [ebx + 0x12c], 0xfffe
test eax, eax
mov dword [esp + 0x58], ebp
jle 0x502a21
push ebp
lea ecx, [esp + 0x2d8]
call fcn.004d0120
mov ecx, 0x3f
lea esi, [esp + 0xfc]
lea edi, [ebx + 0x2c]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
test ebp, ebp
movsb byte es:[edi], byte [esi]
jne 0x501c3e
mov dx, word [esp + 0x30c]
mov word [ebx + 0x12c], dx
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0xfc]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x28]
stosb byte es:[edi], al
call fcn.0050f240
dec eax
cmp eax, 0xf
ja case.0x501c64.2
jmp dword [eax*4 + 0x502e48]
test ebp, ebp
jne 0x501c96
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x501c96
lea eax, [esp + 0xfc]
push 1
lea ecx, [esp + 0x2d8]
push eax
push ecx
mov ecx, dword [ebx + 8]
call fcn.004c2000
jmp case.0x501c64.2
mov ecx, dword [ebx + 8]
push 0
push 0
push 3
push 0
push 0
lea edx, [esp + 0x110]
push 1
lea eax, [esp + 0x2ec]
push edx
push eax
call fcn.004c56e0
jmp case.0x501c64.2
test ebp, ebp
jne 0x501cf1
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x501cf1
lea ecx, [esp + 0xfc]
push ebp
lea edx, [esp + 0x2d8]
push ecx
mov ecx, dword [ebx + 8]
push edx
call fcn.004c2000
test eax, eax
je 0x502a81
jmp case.0x501c64.2
push 0
push 0
push 3
push 0
push 0
lea eax, [esp + 0x110]
push 0
lea ecx, [esp + 0x2ec]
push eax
push ecx
mov ecx, dword [ebx + 8]
call fcn.004c56e0
cmp eax, 1
jne 0x502a81
jmp case.0x501c64.2
test ebp, ebp
jne 0x501d55
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x501d55
mov ecx, dword [ebx + 8]
lea edx, [esp + 0xfc]
push ebp
lea eax, [esp + 0x2d8]
push edx
push eax
call fcn.004c2000
test eax, eax
je 0x502a10
jmp case.0x501c64.2
push 0
push 0
push 3
push 0
push 0
lea ecx, [esp + 0x110]
push 0
lea edx, [esp + 0x2ec]
push ecx
mov ecx, dword [ebx + 8]
push edx
call fcn.004c56e0
cmp eax, 1
jne 0x502a10
jmp case.0x501c64.2
test ebp, ebp
jne 0x501db6
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x501db6
lea eax, [esp + 0xfc]
push ebp
lea ecx, [esp + 0x2d8]
push eax
push ecx
mov ecx, dword [ebx + 8]
call fcn.004c2000
test eax, eax
je 0x502a81
jmp 0x501e18
mov eax, dword [esp + 0x30c]
xor edx, edx
mov dx, word [ebx + 0x12c]
cmp edx, eax
jb 0x501de4
test ebp, ebp
je 0x501de4
lea esi, [ebx + 0x2c]
mov ecx, 0x3f
lea edi, [esp + 0xfc]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
jmp 0x501e18
push 0
push 0
push 3
mov word [ebx + 0x12c], ax
push 0
push 0
lea eax, [esp + 0x110]
push 0
lea ecx, [esp + 0x2ec]
push eax
push ecx
mov ecx, dword [ebx + 8]
call fcn.004c56e0
cmp eax, 1
jne 0x502a81
push 0xffffffffffffffff
lea edx, [esp + 0x100]
push 0
push edx
lea ecx, [esp + 0x2e0]
call fcn.004cfc30
lea ecx, [esp + 0x28]
call fcn.0050f1e0
cmp eax, 0xffffffff
je 0x501fb7
lea ecx, [esp + 0x244]
call fcn.00503cd0
mov eax, dword [ebx + 4]
lea ecx, [esp + 0x244]
push eax
mov byte [esp + 0x27e8], 3
call fcn.004df390
test eax, eax
je 0x502a43
mov cl, byte [esp + 0x13]
push 0
mov byte [esp + 0x8c], cl
lea ecx, [esp + 0x8c]
call fcn.00405cc0
mov ecx, 0x42
lea esi, [esp + 0x358]
lea edi, [esp + 0x22bc]
lea edx, [esp + 0x88]
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x42
lea esi, [esp + 0x358]
lea edi, [esp + 0x24cc]
push edx
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x2c]
mov byte [esp + 0x27e8], 4
call fcn.0050f1e0
push eax
mov eax, dword [esp + 0x23c4]
and eax, 0xffff
lea ecx, [esp + 0x24d4]
shl eax, 3
push eax
push ecx
lea ecx, [esp + 0x254]
call fcn.00503ed0
mov edx, dword [esp + 0x90]
push edx
call fcn.00514b36
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x502a57
mov esi, dword [esp + 0x8c]
test esi, esi
jne 0x501f19
mov esi, 0x53115c
mov ecx, dword [esp + 0x90]
mov edi, ebp
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x90]
push ecx
push ebp
lea ecx, [esp + 0x88]
call fcn.0048a680
lea edx, [esp + 0x80]
lea ecx, [esp + 0x2d4]
push edx
mov byte [esp + 0x27e8], 5
call fcn.004cf9b0
push ebp
call fcn.00514120
mov eax, dword [ebx + 8]
add esp, 4
lea ecx, [esp + 0x80]
mov byte [esp + 0x27e4], 4
mov dword [eax + 0xcc], 0
call fcn.0048a720
push 1
lea ecx, [esp + 0x8c]
mov byte [esp + 0x27e8], 3
call fcn.00405cc0
lea ecx, [esp + 0x244]
mov byte [esp + 0x27e4], 2
call fcn.00503e30
jmp 0x501fc4
mov eax, dword [ebx + 8]
mov dword [eax + 0xcc], 1
mov ecx, 0x42
lea esi, [esp + 0x358]
lea edi, [esp + 0x26d4]
lea eax, [esp + 0x26d4]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebx + 8]
push eax
call fcn.004c1510
lea ecx, [esp + 0x1464]
call fcn.005037d0
mov ecx, dword [ebx + 4]
mov byte [esp + 0x27e4], 6
push ecx
lea ecx, [esp + 0x1468]
call fcn.004df390
mov ecx, 0x42
lea esi, [esp + 0x358]
lea edi, [esp + 0x1b84]
lea edx, [esp + 0xb8]
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x42
lea esi, [esp + 0x358]
lea edi, [esp + 0x21b4]
push edx
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x2d8]
call fcn.004d0740
push eax
lea ecx, [esp + 0x2dc]
call fcn.004d0730
push eax
mov eax, dword [esp + 0x1c90]
and eax, 0xffff
lea ecx, [esp + 0x21c0]
push eax
push ecx
lea ecx, [esp + 0x1478]
call fcn.005039f0
test eax, eax
jne 0x5020b1
lea edx, [esp + 0xdc]
lea ecx, [esp + 0x28]
push edx
call fcn.0050f200
mov eax, dword [eax + 8]
xor ecx, ecx
test eax, eax
setne cl
mov esi, ecx
push 1
lea ecx, [esp + 0xe0]
call fcn.00405cc0
test esi, esi
jne 0x502ac4
lea ecx, [esp + 0x1464]
mov byte [esp + 0x27e4], 2
call fcn.00503830
jmp case.0x501c64.2
test ebp, ebp
jne 0x5020fc
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x5020fc
mov ecx, dword [ebx + 8]
lea edx, [esp + 0xfc]
push ebp
lea eax, [esp + 0x2d8]
push edx
push eax
call fcn.004c2000
test eax, eax
jne 0x502b72
jmp 0x502a10
push 0
push 0
push 3
push 0
push 0
lea ecx, [esp + 0x110]
push 0
lea edx, [esp + 0x2ec]
push ecx
mov ecx, dword [ebx + 8]
push edx
call fcn.004c56e0
cmp eax, 1
je 0x502b72
jmp 0x502a10
test ebp, ebp
jne 0x50215d
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x50215d
lea eax, [esp + 0xfc]
push ebp
lea ecx, [esp + 0x2d8]
push eax
push ecx
mov ecx, dword [ebx + 8]
call fcn.004c2000
test eax, eax
je 0x502a10
jmp 0x5021bf
mov eax, dword [esp + 0x30c]
xor edx, edx
mov dx, word [ebx + 0x12c]
cmp edx, eax
jb 0x50218b
test ebp, ebp
je 0x50218b
lea esi, [ebx + 0x2c]
mov ecx, 0x3f
lea edi, [esp + 0xfc]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
jmp 0x5021bf
push 0
push 0
push 3
mov word [ebx + 0x12c], ax
push 0
push 0
lea eax, [esp + 0x110]
push 0
lea ecx, [esp + 0x2ec]
push eax
push ecx
mov ecx, dword [ebx + 8]
call fcn.004c56e0
cmp eax, 1
jne 0x502a81
push 0xffffffffffffffff
lea edx, [esp + 0x100]
push 0
push edx
lea ecx, [esp + 0x2e0]
call fcn.004cfc30
lea ecx, [esp + 0x28]
call fcn.0050f1e0
cmp eax, 0xffffffff
je 0x502360
lea ecx, [esp + 0x1fc]
call fcn.00503cd0
mov eax, dword [ebx + 4]
lea ecx, [esp + 0x1fc]
push eax
mov byte [esp + 0x27e8], 8
call fcn.004df390
test eax, eax
je 0x502b5e
mov cl, byte [esp + 0x13]
push 0
mov byte [esp + 0x6c], cl
lea ecx, [esp + 0x6c]
call fcn.00405cc0
mov ecx, 0x42
lea esi, [esp + 0x358]
lea edi, [esp + 0x1d94]
lea edx, [esp + 0x68]
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x42
lea esi, [esp + 0x358]
lea edi, [esp + 0x1974]
push edx
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x2c]
mov byte [esp + 0x27e8], 9
call fcn.0050f1e0
push eax
mov eax, dword [esp + 0x1e9c]
and eax, 0xffff
lea ecx, [esp + 0x197c]
shl eax, 3
push eax
push ecx
lea ecx, [esp + 0x20c]
call fcn.00503ed0
mov edx, dword [esp + 0x70]
push edx
call fcn.00514b36
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x502b8a
mov esi, dword [esp + 0x6c]
test esi, esi
jne 0x5022b1
mov esi, 0x53115c
mov ecx, dword [esp + 0x70]
mov edi, ebp
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x70]
push ecx
push ebp
lea ecx, [esp + 0x80]
call fcn.0048a680
lea edx, [esp + 0x78]
lea ecx, [esp + 0x2d4]
push edx
mov byte [esp + 0x27e8], 0xa
call fcn.004cf9b0
push ebp
call fcn.00514120
mov eax, dword [ebx + 8]
add esp, 4
lea ecx, [esp + 0x78]
mov byte [esp + 0x27e4], 9
mov dword [eax + 0xcc], 0
call fcn.0048a720
mov eax, dword [esp + 0x6c]
test eax, eax
je 0x50233c
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x502333
cmp al, 0xff
je 0x502333
dec al
mov byte [ecx], al
jmp 0x50233c
push ecx
call fcn.00514120
add esp, 4
xor ebp, ebp
lea ecx, [esp + 0x1fc]
mov dword [esp + 0x6c], ebp
mov dword [esp + 0x70], ebp
mov dword [esp + 0x74], ebp
mov byte [esp + 0x27e4], 2
call fcn.00503e30
jmp 0x50236f
mov eax, dword [ebx + 8]
xor ebp, ebp
mov dword [eax + 0xcc], 1
mov ecx, 0x42
lea esi, [esp + 0x358]
lea edi, [esp + 0x1fa4]
lea eax, [esp + 0x1fa4]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebx + 8]
push eax
call fcn.004c1510
lea ecx, [esp + 0x16ec]
call fcn.005037d0
mov ecx, dword [ebx + 4]
mov byte [esp + 0x27e4], 0xb
push ecx
lea ecx, [esp + 0x16f0]
call fcn.004df390
mov ecx, 0x42
lea esi, [esp + 0x358]
lea edi, [esp + 0x23c4]
lea edx, [esp + 0xbc]
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x42
lea esi, [esp + 0x358]
lea edi, [esp + 0x1a7c]
push edx
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x2d8]
call fcn.004d0740
push eax
lea ecx, [esp + 0x2dc]
call fcn.004d0730
push eax
mov eax, dword [esp + 0x24d0]
and eax, 0xffff
lea ecx, [esp + 0x1a88]
push eax
push ecx
lea ecx, [esp + 0x1700]
call fcn.005039f0
test eax, eax
jne 0x50248b
lea edx, [esp + 0x98]
lea ecx, [esp + 0x28]
push edx
call fcn.0050f200
mov eax, dword [eax + 8]
xor ecx, ecx
cmp eax, ebp
mov eax, dword [esp + 0x9c]
setne cl
cmp eax, ebp
mov esi, ecx
je 0x50246e
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x502465
cmp al, 0xff
je 0x502465
dec al
mov byte [ecx], al
jmp 0x50246e
push ecx
call fcn.00514120
add esp, 4
cmp esi, ebp
mov dword [esp + 0x9c], ebp
mov dword [esp + 0xa0], ebp
mov dword [esp + 0xa4], ebp
jne 0x502bfc
lea ecx, [esp + 0x16ec]
mov byte [esp + 0x27e4], 2
call fcn.00503830
jmp case.0x501c64.2
lea ecx, [esp + 0x2d4]
call fcn.004d0730
mov ecx, dword [ebx + 8]
push 0x11
mov esi, eax
call fcn.004cc8a0
xor edi, edi
mov ecx, dword [ebx + 8]
push edi
push edi
push 3
push edi
push edi
lea edx, [esp + 0x110]
push edi
lea eax, [esp + 0x2ec]
push edx
push eax
call fcn.004c56e0
cmp eax, 1
jne 0x502cfe
lea ecx, [esp + 0x2d4]
call fcn.004d9640
movzx cx, byte [esp + eax + 0xfc]
cmp cx, si
jne 0x502cfe
jmp case.0x501c64.2
mov ecx, dword [ebx + 8]
lea edx, [esp + 0x25d4]
push edx
call fcn.004c1140
test eax, eax
je 0x502cda
push 0xffffffffffffffff
lea eax, [esp + 0x25d8]
push 0
push eax
lea ecx, [esp + 0x2e0]
call fcn.004cfc30
mov eax, dword [ebx + 8]
mov ecx, 0x42
lea esi, [esp + 0x358]
lea edi, [esp + 0x1c8c]
mov dword [eax + 0xcc], 1
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x1c8c]
push ecx
mov ecx, dword [ebx + 8]
call fcn.004c1510
jmp case.0x501c64.2
test ebp, ebp
jne 0x5025a2
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x5025a2
mov ecx, dword [ebx + 8]
lea edx, [esp + 0xfc]
push ebp
lea eax, [esp + 0x2d8]
push edx
push eax
call fcn.004c2000
test eax, eax
je 0x502a10
jmp 0x5026b5
mov cl, byte [esp + 0x13]
xor edi, edi
mov byte [esp + 0x48], cl
mov dword [esp + 0x4c], edi
mov dword [esp + 0x50], edi
mov dword [esp + 0x54], edi
lea edx, [esp + 0x48]
lea ecx, [esp + 0x2d4]
push edx
mov byte [esp + 0x27e8], 0xd
call fcn.004d05a0
mov eax, dword [esp + 0x1c]
push eax
call fcn.00514b36
mov ebp, eax
add esp, 4
cmp ebp, edi
je 0x502ce5
mov eax, dword [esp + 0x18]
cmp eax, edi
jne 0x5025f5
mov eax, 0x53115c
push ebp
push eax
call fcn.005018f0
cdq
sub eax, edx
add esp, 8
sar eax, 1
cmp eax, edi
mov dword [esp + 0x5c], eax
jle 0x502659
mov eax, 1
mov esi, ebp
sub eax, ebp
mov dword [esp + 0x60], eax
jmp 0x50261f
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x1c]
add eax, esi
cmp eax, ecx
jae 0x50264d
mov cl, byte [esi]
mov dl, byte [ebp + edi*2 + 1]
shl cl, 4
lea eax, [esp + 0x13]
or dl, cl
mov ecx, dword [esp + 0x50]
push eax
push 1
push ecx
lea ecx, [esp + 0x54]
mov byte [esp + 0x1f], dl
call fcn.004f0130
mov eax, dword [esp + 0x5c]
inc edi
add esi, 2
cmp edi, eax
jl 0x50261b
lea edx, [esp + 0x48]
lea ecx, [esp + 0x2d4]
push edx
call fcn.004d03d0
xor esi, esi
lea eax, [esp + 0xfc]
push esi
push esi
push 3
push esi
push esi
push esi
lea ecx, [esp + 0x2ec]
push eax
push ecx
mov ecx, dword [ebx + 8]
call fcn.004c56e0
cmp eax, 1
jne 0x502d5f
mov edx, dword [esp + 0x4c]
mov byte [esp + 0x27e4], 2
push edx
call fcn.00514120
add esp, 4
mov dword [esp + 0x4c], esi
mov dword [esp + 0x50], esi
mov dword [esp + 0x54], esi
xor esi, esi
push 0xffffffffffffffff
lea eax, [esp + 0x100]
push esi
push eax
lea ecx, [esp + 0x2e0]
call fcn.004cfc30
lea ecx, [esp + 0x28]
call fcn.0050f1e0
cmp eax, 0xffffffff
je 0x502dd3
lea ecx, [esp + 0x28c]
call fcn.00503cd0
mov ecx, dword [ebx + 4]
mov byte [esp + 0x27e4], 0xe
push ecx
lea ecx, [esp + 0x290]
call fcn.004df390
test eax, eax
je 0x502dbf
mov ecx, 0x42
lea esi, [esp + 0x358]
lea edi, [esp + 0x1e9c]
lea edx, [esp + 0x14]
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x42
lea esi, [esp + 0x358]
lea edi, [esp + 0x20ac]
push edx
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x2c]
call fcn.0050f1e0
push eax
mov eax, dword [esp + 0x1fa4]
and eax, 0xffff
lea ecx, [esp + 0x20b4]
shl eax, 3
push eax
push ecx
lea ecx, [esp + 0x29c]
call fcn.00503ed0
lea ecx, [esp + 0x28c]
mov byte [esp + 0x27e4], 2
call fcn.00503e30
mov eax, dword [esp + 0x44]
mov ecx, 7
and eax, 0xffff
lea edi, [esp + 0xc0]
lea edx, [eax*8]
sub edx, eax
mov eax, dword [esp + 0x3c]
lea esi, [eax + edx*4]
mov eax, 0x92492493
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebx + 0x14]
mov ecx, dword [ebx + 0x18]
sub ecx, esi
mov ebp, esi
imul ecx
add edx, ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
cmp edx, 1
jae 0x5028ee
mov edi, dword [ebx + 0x10]
test edi, edi
je 0x5027ef
mov ecx, esi
mov eax, 0x92492493
sub ecx, edi
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
cmp edx, 1
mov ecx, edx
ja 0x5027f4
mov ecx, 1
test edi, edi
jne 0x5027fc
xor edx, edx
jmp 0x502811
sub esi, edi
mov eax, 0x92492493
imul esi
add edx, esi
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [edx + ecx]
test eax, eax
mov dword [esp + 0x5c], eax
jge 0x50281e
xor eax, eax
lea ecx, [eax*8]
sub ecx, eax
shl ecx, 2
push ecx
call fcn.00514b36
mov esi, dword [ebx + 0x10]
add esp, 4
cmp esi, ebp
mov dword [esp + 0x60], eax
mov edi, eax
je 0x502854
push esi
push edi
call fcn.00502ed0
add esi, 0x1c
add esp, 8
add edi, 0x1c
cmp esi, ebp
jne 0x502840
lea edx, [esp + 0xc0]
push edx
push edi
call fcn.00502ed0
lea eax, [edi + 0x1c]
mov edi, dword [ebx + 0x14]
add esp, 8
cmp ebp, edi
mov esi, ebp
je 0x502887
mov ebp, eax
push esi
push ebp
call fcn.00502ed0
add esi, 0x1c
add esp, 8
add ebp, 0x1c
cmp esi, edi
jne 0x502873
mov eax, dword [ebx + 0x10]
push eax
mov dword [esp + 0x88], eax
call fcn.00514120
mov eax, dword [esp + 0x60]
mov esi, dword [esp + 0x64]
add esp, 4
lea ecx, [eax*8]
sub ecx, eax
mov eax, dword [ebx + 0x10]
test eax, eax
lea edx, [esi + ecx*4]
mov dword [ebx + 0x18], edx
jne 0x5028bc
xor edx, edx
jmp 0x5028d4
mov ecx, dword [ebx + 0x14]
sub ecx, eax
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [edx + 1]
mov dword [ebx + 0x10], esi
lea ecx, [eax*8]
sub ecx, eax
lea edx, [esi + ecx*4]
mov dword [ebx + 0x14], edx
jmp 0x502a0c
mov ecx, esi
mov eax, 0x92492493
sub ecx, ebp
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
cmp edx, 1
jae 0x502993
lea ecx, [ebp + 0x1c]
cmp ebp, esi
mov dword [esp + 0x84], ecx
mov eax, ebp
je 0x502931
lea edi, [eax + 0x1c]
push eax
push edi
call fcn.00502ed0
mov eax, edi
add esp, 8
cmp eax, esi
jne 0x50291e
mov esi, dword [ebx + 0x14]
mov eax, 0x92492493
mov ecx, esi
sub ecx, ebp
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, 1
sub eax, edx
je 0x50296d
mov edi, eax
lea ecx, [esp + 0xc0]
push ecx
push esi
call fcn.00502ed0
add esp, 8
add esi, 0x1c
dec edi
jne 0x502956
mov edx, dword [ebx + 0x14]
mov eax, ebp
cmp ebp, edx
je 0x50298d
mov edi, eax
add eax, 0x1c
mov ecx, 7
lea esi, [esp + 0xc0]
cmp eax, edx
rep movsd dword es:[edi], dword [esi]
jne 0x502976
add dword [ebx + 0x14], 0x1c
jmp 0x502a0c
lea edi, [esi - 0x1c]
mov ebx, esi
cmp edi, esi
mov dword [esp + 0x84], edi
je 0x5029b7
push edi
push ebx
call fcn.00502ed0
add edi, 0x1c
add esp, 8
add ebx, 0x1c
cmp edi, esi
jne 0x5029a3
mov edx, dword [esp + 0x64]
lea eax, [edx + 0xc]
mov edx, dword [edx + 0x14]
lea eax, [edx - 0x1c]
cmp ebp, eax
je 0x5029dd
sub eax, 0x1c
sub edx, 0x1c
mov ecx, 7
mov esi, eax
mov edi, edx
cmp eax, ebp
rep movsd dword es:[edi], dword [esi]
jne 0x5029c8
lea edx, [ebp + 0x1c]
mov eax, ebp
cmp ebp, edx
je 0x5029fd
mov edi, eax
add eax, 0x1c
mov ecx, 7
lea esi, [esp + 0xc0]
cmp eax, edx
rep movsd dword es:[edi], dword [esi]
jne 0x5029e6
mov eax, dword [esp + 0x64]
mov ebx, dword [esp + 0x64]
add eax, 0xc
add dword [eax + 8], 0x1c
mov ebp, dword [esp + 0x58]
mov eax, dword [esp + 0x7c]
inc ebp
cmp ebp, eax
mov dword [esp + 0x58], ebp
jl 0x501c0a
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x30]
inc eax
and ecx, 0xffff
cmp eax, ecx
mov dword [esp + 0x24], eax
jl 0x501b60
xor esi, esi
jmp 0x502dd3
mov byte [esp + 0x27e4], 2
lea ecx, [esp + 0x244]
jmp 0x502b6d
push 1
lea ecx, [esp + 0x8c]
mov byte [esp + 0x27e8], 3
call fcn.00405cc0
lea ecx, [esp + 0x244]
mov byte [esp + 0x27e4], 2
call fcn.00503e30
push 1
lea ecx, [esp + 0x18]
mov byte [esp + 0x27e8], 1
call fcn.00405cc0
lea ecx, [esp + 0x2d4]
mov byte [esp + 0x27e4], 0
call fcn.004cf930
lea ecx, [esp + 0x28]
mov dword [esp + 0x27e4], 0xffffffff
call fcn.0050f0e0
or eax, 0xffffffff
jmp 0x502e2e
lea edx, [esp + 0xec]
lea ecx, [esp + 0x28]
push edx
call fcn.0050f200
mov ecx, dword [0x531160]
mov byte [esp + 0x27e4], 7
push ecx
push 0
push eax
lea ecx, [ebx + 0x1c]
call fcn.00407be0
push 1
lea ecx, [esp + 0xf0]
mov byte [esp + 0x27e8], 6
call fcn.00405cc0
lea ecx, [esp + 0x1464]
mov byte [esp + 0x27e4], 2
call fcn.00503830
push 1
lea ecx, [esp + 0x18]
mov byte [esp + 0x27e8], 1
call fcn.00405cc0
lea ecx, [esp + 0x2d4]
mov byte [esp + 0x27e4], 0
call fcn.004cf930
lea ecx, [esp + 0x28]
mov dword [esp + 0x27e4], 0xffffffff
call fcn.0050f0e0
mov eax, 1
jmp 0x502e2e
mov byte [esp + 0x27e4], 2
lea ecx, [esp + 0x1fc]
call fcn.00503e30
push 1
lea ecx, [esp + 0x18]
mov byte [esp + 0x27e8], 1
call fcn.00405cc0
jmp 0x502e04
mov eax, dword [esp + 0x6c]
xor esi, esi
cmp eax, esi
je 0x502bb1
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x502ba8
cmp al, 0xff
je 0x502ba8
dec al
mov byte [ecx], al
jmp 0x502bb1
push ecx
call fcn.00514120
add esp, 4
lea ecx, [esp + 0x1fc]
mov dword [esp + 0x6c], esi
mov dword [esp + 0x70], esi
mov dword [esp + 0x74], esi
mov byte [esp + 0x27e4], 2
call fcn.00503e30
mov eax, dword [esp + 0x18]
cmp eax, esi
je 0x502d86
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x502d7d
cmp al, 0xff
je 0x502d7d
dec al
mov byte [ecx], al
jmp 0x502d86
lea edx, [esp + 0xa8]
lea ecx, [esp + 0x28]
push edx
call fcn.0050f200
mov ecx, dword [0x531160]
mov byte [esp + 0x27e4], 0xc
push ecx
push ebp
push eax
lea ecx, [ebx + 0x1c]
call fcn.00407be0
mov eax, dword [esp + 0xac]
cmp eax, ebp
je 0x502c4e
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x502c45
cmp al, 0xff
je 0x502c45
dec al
mov byte [ecx], al
jmp 0x502c4e
push ecx
call fcn.00514120
add esp, 4
lea ecx, [esp + 0x16ec]
mov dword [esp + 0xac], ebp
mov dword [esp + 0xb0], ebp
mov dword [esp + 0xb4], ebp
mov byte [esp + 0x27e4], 2
call fcn.00503830
mov eax, dword [esp + 0x18]
cmp eax, ebp
je 0x502c9c
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x502c93
cmp al, 0xff
je 0x502c93
dec al
mov byte [ecx], al
jmp 0x502c9c
push ecx
call fcn.00514120
add esp, 4
lea ecx, [esp + 0x2d4]
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], ebp
mov byte [esp + 0x27e4], 0
call fcn.004cf930
lea ecx, [esp + 0x28]
mov dword [esp + 0x27e4], 0xffffffff
call fcn.0050f0e0
mov eax, 1
jmp 0x502e2e
mov eax, dword [esp + 0x18]
xor esi, esi
jmp 0x502bd5
mov edx, dword [esp + 0x4c]
push edx
call fcn.00514120
add esp, 4
mov dword [esp + 0x4c], edi
mov dword [esp + 0x50], edi
mov dword [esp + 0x54], edi
mov eax, dword [esp + 0x18]
cmp eax, edi
je 0x502d23
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x502d1a
cmp al, 0xff
je 0x502d1a
dec al
mov byte [ecx], al
jmp 0x502d23
push ecx
call fcn.00514120
add esp, 4
lea ecx, [esp + 0x2d4]
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], edi
mov byte [esp + 0x27e4], 0
call fcn.004cf930
lea ecx, [esp + 0x28]
mov dword [esp + 0x27e4], 0xffffffff
call fcn.0050f0e0
or eax, 0xffffffff
jmp 0x502e2e
mov eax, dword [esp + 0x4c]
push eax
call fcn.00514120
add esp, 4
mov dword [esp + 0x4c], esi
mov dword [esp + 0x50], esi
mov dword [esp + 0x54], esi
jmp 0x502bd1
push ecx
call fcn.00514120
add esp, 4
lea ecx, [esp + 0x2d4]
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], esi
mov byte [esp + 0x27e4], 0
call fcn.004cf930
lea ecx, [esp + 0x28]
mov dword [esp + 0x27e4], 0xffffffff
call fcn.0050f0e0
or eax, 0xffffffff
jmp 0x502e2e
lea ecx, [esp + 0x28c]
mov byte [esp + 0x27e4], 2
call fcn.00503e30
mov eax, dword [esp + 0x18]
cmp eax, esi
je 0x502df8
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x502def
cmp al, 0xff
je 0x502def
dec al
mov byte [ecx], al
jmp 0x502df8
push ecx
call fcn.00514120
add esp, 4
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], esi
lea ecx, [esp + 0x2d4]
mov byte [esp + 0x27e4], 0
call fcn.004cf930
lea ecx, [esp + 0x28]
mov dword [esp + 0x27e4], 0xffffffff
call fcn.0050f0e0
xor eax, eax
mov ecx, dword [esp + 0x27dc]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x27d8
ret