Function at 0x5050e0
Capabilities:
Enumerate pe sections

Disassembly:
sub esp, 0x18
mov eax, dword [esp + 0x1c]
push ebx
push ebp
mov ebp, ecx
xor ebx, ebx
push esi
push edi
mov ecx, dword [ebp + 6]
mov dword [ebp + 0xa], eax
cmp ecx, ebx
je case.0x50513b.35
cmp eax, ebx
je case.0x50513b.35
mov esi, dword [esp + 0x30]
cmp esi, ebx
jl case.0x50513b.35
mov al, byte [eax + 0xec]
test al, al
je 0x505127
cmp al, 1
mov dword [esp + 0x2c], 1
jne 0x50512b
mov dword [esp + 0x2c], ebx
movsx eax, word [ebp + 4]
add eax, 0xffffffe1
cmp eax, 5
ja case.0x50513b.35
jmp dword [eax*4 + 0x505ce4]
mov eax, dword [ebp + 0x32]
cmp eax, ebx
je 0x505155
push eax
call fcn.00643cfc
add esp, 4
mov dword [ebp + 0x32], ebx
lea eax, [esi + esi + 2]
push eax
call fcn.00643b70
mov dword [ebp + 0x32], eax
add esp, 4
xor eax, eax
cmp esi, ebx
jle 0x50517a
mov ecx, dword [ebp + 0x32]
inc eax
cmp eax, esi
mov word [ecx + eax*2 - 2], 0xffff
jl 0x50516b
mov eax, dword [ebp + 0x10]
mov dword [ebp + 0x3e], esi
cmp eax, ebx
jne 0x505194
push 0x38a4
call fcn.00643b70
add esp, 4
mov dword [ebp + 0x10], eax
mov edi, dword [ebp + 0x10]
mov ecx, 0xe29
xor eax, eax
push 1
rep stosd dword es:[edi], eax
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xa]
mov ecx, dword [0x826818]
push 0x1f4
push edx
push eax
call fcn.00447760
cmp ax, 1
mov word [ebp + 0xe], ax
jl case.0x50513b.35
mov ecx, dword [ebp + 6]
xor eax, eax
mov dword [esp + 0x20], ebx
mov al, byte [ecx + 0x4b5]
cmp eax, 7
je 0x50528c
cmp eax, ebx
je 0x50528c
cmp eax, 1
je 0x50528c
cmp eax, 2
je 0x50528c
cmp eax, 8
je 0x50528c
cmp eax, 3
je 0x50528c
mov eax, dword [esp + 0x30]
xor esi, esi
test eax, eax
jle case.0x50513b.35
movsx eax, word [ebp + 0xe]
cmp ebx, eax
mov edi, ebx
jge 0x505279
lea edx, [ebx*8]
sub edx, ebx
lea edx, [ebx + edx*4]
test esi, esi
jle 0x505251
mov ecx, dword [esp + 0x34]
mov eax, esi
shl eax, 5
add eax, ecx
mov ecx, dword [ebp + 0x10]
mov ecx, dword [edx + ecx + 8]
cmp dword [eax - 0x20], ecx
jge 0x50524f
cmp dword [eax], ecx
jge 0x505270
test esi, esi
jne 0x505262
mov ecx, dword [esp + 0x34]
mov eax, dword [ebp + 0x10]
mov ecx, dword [ecx]
cmp ecx, dword [edx + eax + 8]
je 0x505270
movsx eax, word [ebp + 0xe]
inc edi
add edx, 0x1d
cmp edi, eax
jl 0x505230
jmp 0x505279
mov edx, dword [ebp + 0x32]
mov ebx, edi
mov word [edx + esi*2], di
mov eax, dword [esp + 0x30]
inc esi
cmp esi, eax
jl 0x50521a
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0xc
lea eax, [esp + 0x14]
push eax
call fcn.00643f06
push 0
lea ecx, [esp + 0x18]
call fcn.00643f00
mov esi, dword [eax + 0x14]
push 0
lea ecx, [esp + 0x18]
add esi, 0x76c
call fcn.00643f00
mov edi, dword [eax + 0x10]
push 0
lea ecx, [esp + 0x18]
inc edi
call fcn.00643f00
lea esi, [esi + esi*4]
mov eax, dword [eax + 0xc]
lea ecx, [esi + esi*4]
lea edi, [edi + ecx*4]
lea ecx, [edi + edi*4]
xor edi, edi
mov dword [esp + 0x18], edi
lea edx, [ecx + ecx*4]
lea ecx, [eax + edx*4]
mov edx, dword [esp + 0x30]
mov dword [esp + 0x24], ecx
lea eax, [edx - 1]
test eax, eax
jle 0x505320
mov edx, dword [esp + 0x34]
mov ecx, eax
shl ecx, 5
add ecx, edx
mov dx, word [ecx - 0x20]
mov si, word [ecx]
and edx, 0x7ff
and esi, 0x7ff
cmp esi, edx
jb 0x50531a
dec eax
sub ecx, 0x20
test eax, eax
jg 0x5052f9
jmp 0x505320
mov edi, eax
mov dword [esp + 0x18], edi
movsx eax, word [ebp + 0xe]
dec eax
mov dword [esp + 0x10], eax
js 0x505413
lea ecx, [eax*8]
sub ecx, eax
lea edx, [eax + ecx*4]
mov dword [esp + 0x1c], edx
mov ecx, dword [ebp + 0x10]
mov edx, dword [esp + 0x1c]
mov esi, dword [edx + ecx + 8]
mov ecx, dword [esp + 0x24]
sub ecx, esi
cmp ecx, 0x46a
jg 0x505413
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x2c], edi
cmp edi, ecx
jge 0x5053fb
mov eax, dword [esp + 0x34]
shl edi, 5
add edi, eax
mov eax, esi
mov ebx, 0x2710
cdq
idiv ebx
mov cx, word [edi]
and ecx, 0x7ff
cmp ecx, edx
jne 0x5053c0
push 0
lea ecx, [esp + 0x18]
call fcn.00643f00
mov ecx, dword [eax + 0x14]
mov edx, dword [ebp + 0x10]
mov eax, dword [esp + 0x1c]
add ecx, 0x76c
mov esi, dword [eax + edx + 8]
mov eax, 0x68db8bad
imul esi
sar edx, 0xc
mov eax, edx
shr eax, 0x1f
add edx, eax
cmp ecx, edx
je 0x5053e2
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
inc eax
add edi, 0x20
cmp eax, ecx
mov dword [esp + 0x2c], eax
jl 0x505375
mov ebx, dword [esp + 0x20]
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
jmp 0x5053fb
mov eax, dword [esp + 0x10]
mov ecx, dword [ebp + 0x32]
mov edx, dword [esp + 0x2c]
mov edi, dword [esp + 0x18]
mov ebx, eax
mov word [ecx + edx*2], ax
mov dword [esp + 0x20], ebx
mov edx, dword [esp + 0x1c]
dec eax
sub edx, 0x1d
cmp eax, ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], edx
jge 0x50533f
lea ecx, [edi - 1]
xor esi, esi
test ecx, ecx
mov dword [esp + 0x30], esi
jle 0x505456
mov edx, dword [esp + 0x34]
mov eax, ecx
shl eax, 5
add eax, edx
mov dx, word [eax - 0x20]
mov si, word [eax]
and edx, 0x7ff
and esi, 0x7ff
cmp esi, edx
jb 0x505450
dec ecx
sub eax, 0x20
test ecx, ecx
jg 0x50542b
mov esi, dword [esp + 0x30]
jmp 0x505456
mov esi, ecx
mov dword [esp + 0x30], esi
movsx eax, word [ebp + 0xe]
dec eax
cmp eax, ebx
mov dword [esp + 0x10], eax
jl case.0x50513b.35
lea ecx, [eax*8]
sub ecx, eax
lea edx, [eax + ecx*4]
mov dword [esp + 0x1c], edx
mov ecx, dword [ebp + 0x10]
mov edx, dword [esp + 0x1c]
mov ecx, dword [edx + ecx + 8]
mov edx, dword [esp + 0x24]
sub edx, ecx
cmp edx, 0x2b7a
jg case.0x50513b.35
cmp edx, 0x46a
jle case.0x50513b.35
cmp esi, edi
mov dword [esp + 0x2c], esi
jge 0x505541
mov eax, dword [esp + 0x34]
shl esi, 5
add esi, eax
mov eax, ecx
mov ebx, 0x2710
cdq
idiv ebx
mov di, word [esi]
and edi, 0x7ff
cmp edi, edx
jne 0x505502
push 0
lea ecx, [esp + 0x18]
call fcn.00643f00
mov eax, dword [eax + 0x14]
mov ecx, dword [ebp + 0x10]
mov edx, dword [esp + 0x1c]
add eax, 0x76c
mov ecx, dword [edx + ecx + 8]
lea edi, [eax - 1]
mov eax, 0x68db8bad
imul ecx
sar edx, 0xc
mov eax, edx
shr eax, 0x1f
add edx, eax
cmp edi, edx
je 0x505524
mov eax, dword [esp + 0x2c]
mov edi, dword [esp + 0x18]
inc eax
add esi, 0x20
cmp eax, edi
mov dword [esp + 0x2c], eax
jl 0x5054b5
mov ebx, dword [esp + 0x20]
mov esi, dword [esp + 0x30]
mov eax, dword [esp + 0x10]
jmp 0x505541
mov eax, dword [esp + 0x10]
mov ecx, dword [ebp + 0x32]
mov edx, dword [esp + 0x2c]
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x30]
mov ebx, eax
mov word [ecx + edx*2], ax
mov dword [esp + 0x20], ebx
mov edx, dword [esp + 0x1c]
dec eax
sub edx, 0x1d
cmp eax, ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], edx
jge 0x505477
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0xc
mov eax, dword [ebp + 0x32]
cmp eax, ebx
je 0x505576
push eax
call fcn.00643cfc
add esp, 4
mov dword [ebp + 0x32], ebx
lea eax, [esi + esi + 2]
push eax
call fcn.00643b70
mov dword [ebp + 0x32], eax
add esp, 4
xor eax, eax
cmp esi, ebx
jle 0x50559b
mov ecx, dword [ebp + 0x32]
inc eax
cmp eax, esi
mov word [ecx + eax*2 - 2], 0xffff
jl 0x50558c
mov eax, dword [ebp + 0x16]
mov dword [ebp + 0x3e], esi
cmp eax, ebx
jne 0x5055b5
push 0x1900
call fcn.00643b70
add esp, 4
mov dword [ebp + 0x16], eax
mov edi, dword [ebp + 0x16]
mov ecx, 0x640
xor eax, eax
push 0x64
rep stosd dword es:[edi], eax
mov edx, dword [ebp + 0x16]
mov eax, dword [ebp + 0xa]
mov ecx, dword [0x826818]
push edx
push eax
call fcn.00447800
cmp ax, 1
mov word [ebp + 0x14], ax
jl case.0x50513b.35
mov ecx, dword [ebp + 6]
xor eax, eax
xor edi, edi
mov al, byte [ecx + 0x4b5]
mov dword [esp + 0x2c], edi
cmp eax, 7
je 0x50569b
cmp eax, ebx
je 0x50569b
cmp eax, 1
je 0x50569b
cmp eax, 2
je 0x50569b
cmp eax, 8
je 0x50569b
cmp eax, 3
je 0x50569b
mov eax, dword [esp + 0x30]
xor esi, esi
test eax, eax
jle case.0x50513b.35
mov ebx, dword [esp + 0x34]
movsx eax, word [ebp + 0x14]
cmp edi, eax
jge 0x505688
mov edx, edi
shl edx, 6
test esi, esi
jle 0x50565e
mov ecx, dword [ebp + 0x16]
mov eax, esi
shl eax, 5
mov ecx, dword [edx + ecx + 0x11]
add eax, ebx
cmp dword [eax - 0x20], ecx
jge 0x50565c
cmp dword [eax], ecx
jge 0x50567d
test esi, esi
jne 0x50566b
mov eax, dword [ebp + 0x16]
mov ecx, dword [ebx]
cmp ecx, dword [edx + eax + 0x11]
je 0x50567d
movsx eax, word [ebp + 0x14]
inc edi
add edx, 0x40
cmp edi, eax
jl 0x505641
mov edi, dword [esp + 0x2c]
jmp 0x505688
mov edx, dword [ebp + 0x32]
mov dword [esp + 0x2c], edi
mov word [edx + esi*2], di
mov eax, dword [esp + 0x30]
inc esi
cmp esi, eax
jl 0x505634
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0xc
lea eax, [esp + 0x20]
push eax
call fcn.00643f06
push 0
lea ecx, [esp + 0x24]
call fcn.00643f00
mov esi, dword [eax + 0x14]
push 0
lea ecx, [esp + 0x24]
add esi, 0x76c
call fcn.00643f00
mov edi, dword [eax + 0x10]
push 0
lea ecx, [esp + 0x24]
inc edi
call fcn.00643f00
lea esi, [esi + esi*4]
mov eax, dword [eax + 0xc]
lea ecx, [esi + esi*4]
movsx esi, word [ebp + 0x14]
lea edi, [edi + ecx*4]
dec esi
lea ecx, [edi + edi*4]
lea edx, [ecx + ecx*4]
lea ecx, [eax + edx*4]
mov dword [esp + 0x1c], ecx
js case.0x50513b.35
mov edi, dword [esp + 0x30]
mov eax, esi
shl eax, 6
mov dword [esp + 0x24], eax
mov edx, dword [ebp + 0x16]
mov ecx, dword [esp + 0x1c]
mov eax, dword [eax + edx + 0x11]
sub ecx, eax
cmp ecx, 0x4b8
jg case.0x50513b.35
xor ecx, ecx
test edi, edi
jle 0x505751
cdq
mov ebx, 0x2710
idiv ebx
mov eax, dword [esp + 0x34]
mov bx, word [eax]
and ebx, 0x7ff
cmp ebx, edx
je 0x505746
inc ecx
add eax, 0x20
cmp ecx, edi
jl 0x50572f
jmp 0x505751
mov edx, dword [ebp + 0x32]
mov dword [esp + 0x2c], esi
mov word [edx + ecx*2], si
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x2c]
dec esi
sub eax, 0x40
cmp esi, ecx
mov dword [esp + 0x24], eax
jge 0x505704
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0xc
mov eax, dword [ebp + 0x32]
cmp eax, ebx
je 0x505782
push eax
call fcn.00643cfc
add esp, 4
mov dword [ebp + 0x32], ebx
lea eax, [esi + esi + 2]
push eax
call fcn.00643b70
mov dword [ebp + 0x32], eax
add esp, 4
xor eax, eax
cmp esi, ebx
jle 0x5057a7
mov ecx, dword [ebp + 0x32]
inc eax
cmp eax, esi
mov word [ecx + eax*2 - 2], 0xffff
jl 0x505798
mov eax, dword [ebp + 0x1e]
mov dword [ebp + 0x3e], esi
cmp eax, ebx
jne 0x5057c1
push 0x8e30
call fcn.00643b70
add esp, 4
mov dword [ebp + 0x1e], eax
mov edx, dword [ebp + 0x1e]
mov eax, dword [ebp + 0xa]
push 0x15e
push edx
push eax
movsx ax, byte [eax + 0xec]
push eax
call sub.Viewthem.dll_int___cdecl_INFO_GetGGBWTitle_short_int__char___struct_ext_ggbw_title___short_int_
add esp, 0x10
cmp eax, 1
mov dword [ebp + 0x1a], eax
jl case.0x50513b.35
mov eax, dword [esp + 0x30]
xor edx, edx
xor esi, esi
mov dword [esp + 0x2c], edx
test eax, eax
jle case.0x50513b.35
mov eax, dword [ebp + 0x1a]
dec eax
cmp eax, edx
jl 0x50586a
mov edi, dword [ebp + 0x1e]
lea ecx, [eax + eax*2]
lea ecx, [eax + ecx*4]
lea edi, [edi + ecx*8 + 0xc]
mov ecx, dword [edi]
mov ebx, dword [0x6a2d04]
cmp ecx, ebx
jle 0x505822
mov ecx, ebx
test esi, esi
jle 0x505840
mov ebx, dword [esp + 0x34]
mov edx, esi
shl edx, 5
add edx, ebx
cmp dword [edx - 0x20], ecx
jge 0x50583a
cmp dword [edx], ecx
jge 0x505854
mov edx, dword [esp + 0x2c]
test esi, esi
jne 0x50584a
mov ebx, dword [esp + 0x34]
cmp dword [ebx], ecx
je 0x505854
dec eax
sub edi, 0x68
cmp eax, edx
jge 0x505814
jmp 0x50586a
mov ecx, dword [ebp + 0x32]
xor edx, edx
mov word [ecx + esi*2], ax
dec eax
test eax, eax
setl dl
dec edx
and edx, eax
mov dword [esp + 0x2c], edx
mov eax, dword [esp + 0x30]
inc esi
cmp esi, eax
jl 0x5057ff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0xc
mov eax, dword [ebp + 0x32]
cmp eax, ebx
je 0x505890
push eax
call fcn.00643cfc
add esp, 4
mov dword [ebp + 0x32], ebx
lea edi, [esi + esi + 2]
push edi
call fcn.00643b70
mov dword [ebp + 0x32], eax
add esp, 4
xor eax, eax
cmp esi, ebx
jle 0x5058b5
mov edx, dword [ebp + 0x32]
inc eax
cmp eax, esi
mov word [edx + eax*2 - 2], 0xffff
jl 0x5058a6
mov eax, dword [ebp + 0x36]
mov dword [ebp + 0x3e], esi
cmp eax, ebx
je 0x5058cb
push eax
call fcn.00643cfc
add esp, 4
mov dword [ebp + 0x36], ebx
push edi
call fcn.00643b70
mov dword [ebp + 0x36], eax
add esp, 4
xor eax, eax
cmp esi, ebx
jle 0x5058ea
mov ecx, dword [ebp + 0x36]
inc eax
cmp eax, esi
mov word [ecx + eax*2 - 2], bx
jl 0x5058dd
mov eax, dword [ebp + 0x26]
cmp eax, ebx
je 0x5058fd
push eax
call fcn.00643cfc
add esp, 4
mov dword [ebp + 0x26], ebx
mov eax, dword [esp + 0x2c]
mov dword [ebp + 0x22], ebx
cmp eax, ebx
jne case.0x50513b.35
mov eax, dword [ebp + 0xa]
mov ecx, dword [0x826818]
movsx dx, byte [eax + 0xec]
push edx
push eax
call fcn.00446d60
cmp ax, bx
jl case.0x50513b.35
movsx esi, ax
mov eax, dword [0x86893c]
lea esi, [esi + esi*4]
shl esi, 1
movsx eax, word [esi + eax + 4]
cmp eax, 1
mov dword [ebp + 0x22], eax
jl case.0x50513b.35
inc eax
lea ecx, [eax + eax*4]
shl ecx, 3
sub ecx, eax
shl ecx, 2
push ecx
call fcn.00643b70
mov edx, dword [ebp + 0x22]
mov dword [ebp + 0x26], eax
mov edi, eax
add esp, 4
lea ecx, [edx + edx*4]
shl ecx, 3
sub ecx, edx
mov edx, dword [0x86893c]
shl ecx, 2
mov esi, dword [esi + edx + 6]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 6]
mov al, byte [ecx + 0x4b5]
cmp eax, 4
je 0x5059b8
cmp eax, 5
je 0x5059b8
cmp eax, 6
je 0x5059b8
cmp eax, 9
je 0x5059b8
cmp eax, 0xa
je 0x5059b8
cmp eax, 0xb
jne case.0x50513b.35
mov edx, dword [esp + 0x30]
xor eax, eax
lea esi, [edx - 1]
test esi, esi
jl case.0x50513b.35
mov edx, dword [esp + 0x34]
mov ecx, esi
shl ecx, 5
add ecx, edx
mov dword [esp + 0x30], ecx
mov edi, dword [ebp + 0x22]
mov ebx, dword [ecx]
xor edx, edx
cmp eax, edi
mov dword [esp + 0x34], edx
jge 0x505a2e
lea edi, [eax + eax*4]
shl edi, 3
sub edi, eax
shl edi, 2
mov ecx, dword [ebp + 0x26]
cmp dword [edi + ecx + 0xa], ebx
jl 0x505a2a
mov ecx, dword [esp + 0x34]
test ecx, ecx
jne 0x505a14
mov ecx, dword [ebp + 0x32]
mov dword [esp + 0x34], 1
mov edx, esi
mov word [ecx + esi*2], ax
mov ecx, dword [ebp + 0x36]
inc word [ecx + edx*2]
inc eax
add edi, 0x9c
lea ecx, [ecx + edx*2]
cmp eax, dword [ebp + 0x22]
jl 0x5059f2
mov ecx, dword [esp + 0x30]
dec esi
sub ecx, 0x20
test esi, esi
mov dword [esp + 0x30], ecx
jge 0x5059d8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0xc
mov eax, dword [ebp + 0x32]
cmp eax, ebx
je 0x505a57
push eax
call fcn.00643cfc
add esp, 4
mov dword [ebp + 0x32], ebx
lea edi, [esi + esi + 2]
push edi
call fcn.00643b70
mov dword [ebp + 0x32], eax
add esp, 4
xor eax, eax
cmp esi, ebx
jle 0x505a7c
mov edx, dword [ebp + 0x32]
inc eax
cmp eax, esi
mov word [edx + eax*2 - 2], 0xffff
jl 0x505a6d
mov eax, dword [ebp + 0x3a]
mov dword [ebp + 0x3e], esi
cmp eax, ebx
je 0x505a92
push eax
call fcn.00643cfc
add esp, 4
mov dword [ebp + 0x3a], ebx
push edi
call fcn.00643b70
mov dword [ebp + 0x3a], eax
add esp, 4
xor eax, eax
cmp esi, ebx
jle 0x505ab1
mov ecx, dword [ebp + 0x3a]
inc eax
cmp eax, esi
mov word [ecx + eax*2 - 2], bx
jl 0x505aa4
mov eax, dword [ebp + 0x36]
cmp eax, ebx
je 0x505ac4
push eax
call fcn.00643cfc
add esp, 4
mov dword [ebp + 0x36], ebx
push edi
call fcn.00643b70
mov dword [ebp + 0x36], eax
add esp, 4
xor eax, eax
cmp esi, ebx
jle 0x505ae3
mov edx, dword [ebp + 0x36]
inc eax
cmp eax, esi
mov word [edx + eax*2 - 2], bx
jl 0x505ad6
cmp dword [ebp + 0x2e], ebx
jne 0x505b29
push 0x7bc78
call fcn.00643b70
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x505b24
mov edx, ebx
mov esi, 0xbb8
mov ecx, 6
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
mov ecx, 0x2a
mov edi, edx
rep stosd dword es:[edi], eax
add edx, 0xa9
dec esi
stosb byte es:[edi], al
jne 0x505b02
mov eax, ebx
jmp 0x505b26
xor eax, eax
mov dword [ebp + 0x2e], eax
mov eax, dword [esp + 0x2c]
lea esi, [ebp + 0x2a]
test eax, eax
mov dword [esi], 0
jne case.0x50513b.35
mov eax, dword [ebp + 0x2e]
mov edi, dword [esp + 0x34]
mov ecx, dword [0x6a2d04]
push eax
mov edx, dword [edi]
mov eax, dword [ebp + 0xa]
push esi
push ecx
push edx
push eax
push 0
call fcn.004db780
mov esi, dword [esi]
add esp, 0x18
cmp esi, 1
jl case.0x50513b.35
mov ecx, dword [ebp + 6]
xor eax, eax
mov al, byte [ecx + 0x4b5]
cmp eax, 4
je 0x505b97
cmp eax, 5
je 0x505b97
cmp eax, 6
je 0x505b97
cmp eax, 9
je 0x505b97
cmp eax, 0xa
je 0x505b97
cmp eax, 0xb
jne case.0x50513b.35
mov eax, dword [esp + 0x30]
xor ebx, ebx
cmp eax, ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x2c], ebx
jle case.0x50513b.35
mov dword [esp + 0x20], edi
mov edx, dword [edi]
mov dword [esp + 0x1c], edx
xor edx, edx
cmp ebx, esi
mov dword [esp + 0x24], edx
jge 0x505cb7
lea eax, [ebx*8]
sub eax, ebx
lea eax, [eax + eax*2]
lea edi, [ebx + eax*8]
mov ecx, dword [ebp + 0x2e]
lea eax, [ecx + edi]
mov ecx, dword [ecx + edi]
mov ebx, dword [eax + 4]
mov eax, dword [eax + 8]
lea ecx, [ecx + ecx*4]
lea ecx, [ecx + ecx*4]
lea ecx, [ebx + ecx*4]
lea ecx, [ecx + ecx*4]
lea ecx, [ecx + ecx*4]
lea ecx, [eax + ecx*4]
mov eax, dword [esp + 0x1c]
cmp eax, ecx
jl 0x505cb3
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x505c22
mov edx, dword [esp + 0x2c]
mov eax, dword [ebp + 0x32]
mov ebx, dword [esp + 0x34]
mov dword [esp + 0x24], 1
mov word [eax + edx*2], bx
jmp 0x505c26
mov ebx, dword [esp + 0x34]
mov ecx, dword [ebp + 0x2e]
mov ecx, dword [ecx + edi + 0x7a]
test ecx, ecx
jne 0x505c5a
mov eax, dword [ebp + 0x3a]
cmp word [eax + edx*2], cx
lea eax, [eax + edx*2]
jne 0x505c44
mov word [eax], 1
jmp 0x505c5a
test ecx, ecx
jne 0x505c5a
mov ecx, dword [ebp + 0x3a]
cmp word [ecx + edx*2], 0xffff
lea eax, [ecx + edx*2]
jne 0x505c5a
mov word [eax], 2
mov eax, dword [ebp + 0x2e]
mov ecx, dword [eax + edi + 0x7a]
cmp ecx, 1
jne 0x505c91
mov eax, dword [ebp + 0x3a]
cmp word [eax + edx*2], 0
lea eax, [eax + edx*2]
jne 0x505c7a
mov word [eax], 0xffff
jmp 0x505c91
cmp ecx, 1
jne 0x505c91
mov ecx, dword [ebp + 0x3a]
cmp word [ecx + edx*2], 1
lea eax, [ecx + edx*2]
jne 0x505c91
mov word [eax], 2
mov eax, dword [ebp + 0x36]
inc word [eax + edx*2]
mov esi, dword [ebp + 0x2a]
inc ebx
lea eax, [eax + edx*2]
add edi, 0xa9
cmp ebx, esi
mov dword [esp + 0x34], ebx
jl 0x505bd4
jmp 0x505cb7
mov ebx, dword [esp + 0x34]
mov eax, dword [esp + 0x2c]
mov edi, dword [esp + 0x20]
mov ecx, dword [esp + 0x30]
inc eax
add edi, 0x20
cmp eax, ecx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x20], edi
jl 0x505bb1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0xc