Function at 0x51d420
Capabilities:
Enumerate pe sections

Disassembly:
sub esp, 0x2c
push ebx
mov ebx, dword [esp + 0x38]
movzx eax, byte [ebx]
cmp eax, 0x6b
push ebp
push esi
mov ebp, ecx
push edi
mov dword [esp + 0x10], ebp
ja case.0x51d448.52
mov esi, dword [esp + 0x40]
movzx ecx, byte [eax + 0x51d9f0]
jmp dword [ecx*4 + 0x51d970]
mov edi, dword [esi + 4]
mov eax, dword [esi + 8]
movzx edx, byte [ebx + 1]
movzx ecx, byte [ebx + 2]
add eax, edi
mov edi, dword [esi + 0xc]
mov ebp, edi
shl edx, 1
shl ecx, 1
sar ebp, 1
lea edi, [edi + ebp + 1]
jmp 0x51d55d
mov eax, dword [esi + 4]
mov ebp, dword [esi + 8]
movzx edx, byte [ebx + 1]
movzx ecx, byte [ebx + 2]
mov edi, dword [esi + 0xc]
sub eax, ebp
mov ebp, edi
shl edx, 1
shl ecx, 1
add eax, 0xff
sar ebp, 1
lea edi, [edi + ebp + 1]
jmp 0x51d55d
mov edi, dword [esi]
mov eax, dword [esi + 8]
movzx edx, byte [ebx + 1]
movzx ecx, byte [ebx + 2]
add eax, edi
mov edi, dword [esi + 0xc]
mov ebp, edi
shl edx, 1
shl ecx, 1
sar ebp, 1
lea edi, [edi + ebp + 1]
jmp 0x51d55d
mov eax, dword [esi]
jmp 0x51d476
mov edi, dword [esi]
mov eax, dword [esi + 4]
movzx edx, byte [ebx + 1]
movzx ecx, byte [ebx + 2]
add eax, edi
mov edi, dword [esi + 0xc]
mov ebp, edi
shl edx, 1
shl ecx, 1
sar ebp, 1
lea edi, [edi + ebp + 1]
jmp 0x51d55d
mov eax, dword [esi]
mov ebp, dword [esi + 4]
jmp 0x51d479
mov eax, dword [esi + 8]
mov ebp, dword [esi + 4]
mov edi, dword [esi]
movzx edx, byte [ebx + 1]
movzx ecx, byte [ebx + 2]
add eax, ebp
add eax, edi
mov edi, dword [esi + 0xc]
lea edx, [edx + edx*2]
lea ecx, [ecx + ecx*2]
shl edi, 2
jmp 0x51d55d
mov eax, dword [esi + 4]
mov edi, dword [esi + 8]
sub eax, edi
mov edi, dword [esi]
lea eax, [eax + edi + 0xff]
movzx edx, byte [ebx + 1]
movzx ecx, byte [ebx + 2]
mov edi, dword [esi + 0xc]
lea edx, [edx + edx*2]
lea ecx, [ecx + ecx*2]
shl edi, 2
jmp 0x51d55d
mov eax, dword [esi + 8]
mov edi, dword [esi + 4]
jmp 0x51d512
mov eax, dword [esi]
mov edi, dword [esi + 8]
mov ebp, dword [esi + 4]
sub eax, edi
sub eax, ebp
add eax, 0x1fe
jmp 0x51d51d
movzx edx, byte [ebx + 1]
movzx ecx, byte [ebx + 2]
mov eax, dword [esi + eax*4 - 0x40]
mov edi, dword [esi + 0xc]
lea ebp, [edi + eax]
add ebx, 4
cmp ebp, ecx
jl 0x51d890
movzx ecx, byte [ebx - 1]
add edi, edx
add ebx, ecx
cmp eax, edi
jg 0x51d890
mov ebp, dword [esp + 0x10]
mov edx, ebx
sub edx, ecx
push edx
push esi
mov ecx, ebp
call fcn.0051d420
jmp 0x51d894
movzx ecx, byte [ebx + 1]
mov edx, dword [esi + 0xc]
mov eax, dword [esi + eax*4 - 0x80]
lea edi, [edx + eax]
add ebx, 3
cmp edi, ecx
jl 0x51d894
movzx edi, byte [ebx - 1]
lea ecx, [edx + ecx + 1]
add ebx, edi
cmp eax, ecx
jg 0x51d894
mov edx, ebx
sub edx, edi
push edx
push esi
mov ecx, ebp
call fcn.0051d420
jmp 0x51d894
movzx ecx, byte [ebx + 1]
movzx edi, byte [ebx + 4]
mov eax, dword [esi + eax*4 - 0x8c]
movzx edx, byte [ebx + 2]
mov dword [esp + 0x40], ecx
movzx ecx, byte [ebx + 3]
shl ecx, 8
mov dword [esp + 0x44], eax
mov eax, dword [esi + 0xc]
add ecx, edi
mov edi, dword [esp + 0x44]
add edi, eax
add ebx, 7
cmp edi, edx
jge 0x51d609
add ebx, ecx
jmp 0x51d894
movzx edx, byte [ebx - 2]
movzx edi, byte [ebx - 1]
shl edx, 8
add edx, edi
mov edi, dword [esp + 0x40]
add eax, edi
mov edi, dword [esp + 0x44]
add ebx, edx
cmp edi, eax
jg 0x51d894
sub ecx, edx
add ecx, ebx
push ecx
push esi
mov ecx, ebp
call fcn.0051d420
jmp 0x51d894
mov eax, dword [esi + eax*4 - 0x98]
mov ecx, dword [esi + 0xc]
movzx edi, byte [ebx + 1]
lea edx, [ecx + eax]
cmp edx, edi
jl case.0x51d448.44
movzx edx, byte [ebx + 2]
add edx, ecx
cmp eax, edx
jg case.0x51d448.44
add ebx, 3
jmp 0x51d894
movzx edi, byte [ebx + 1]
movzx edx, byte [ebx + 2]
mov eax, dword [ebp + eax*4 - 0x94]
mov ecx, dword [ebp + 0x1c]
shl edi, 8
add edx, edi
movzx edi, byte [ebx + 3]
shl edx, 8
add edx, edi
lea edi, [ecx + eax]
cmp edi, edx
jl case.0x51d448.44
movzx edx, byte [ebx + 4]
movzx edi, byte [ebx + 5]
shl edx, 8
add edx, edi
movzx edi, byte [ebx + 6]
shl edx, 8
add edx, ecx
add edi, edx
cmp eax, edi
jg case.0x51d448.44
add ebx, 7
jmp 0x51d894
movzx eax, byte [ebx + 1]
lea ebx, [ebx + eax + 2]
jmp 0x51d894
movzx ecx, byte [ebx + 1]
movzx edx, byte [ebx + 2]
shl ecx, 8
add edx, ebx
lea ebx, [edx + ecx + 3]
jmp 0x51d894
movzx eax, byte [ebx + 1]
movzx ecx, byte [ebx + 2]
movzx edx, byte [ebx + 3]
shl eax, 8
add eax, ecx
shl eax, 8
add edx, ebx
lea ebx, [edx + eax + 4]
jmp 0x51d894
mov edx, dword [esi + 0x20]
mov ebp, dword [ebp + 0x10]
sub edx, eax
mov dword [esp + 0x34], edx
movzx edi, byte [ebx + 1]
add edi, dword [esi + 0x10]
mov ecx, eax
shl edi, cl
mov ecx, edx
sar ebp, cl
mov dword [esp + 0x24], edi
sub ebp, edi
mov dword [esp + 0x14], ebp
movzx edi, byte [ebx + 2]
add edi, dword [esi + 0x14]
mov ecx, eax
shl edi, cl
mov ecx, dword [esp + 0x10]
mov ebp, dword [ecx + 0x14]
mov ecx, edx
sar ebp, cl
mov dword [esp + 0x28], edi
sub ebp, edi
mov dword [esp + 0x18], ebp
movzx edi, byte [ebx + 3]
mov ecx, dword [esi + 0x18]
mov ebp, dword [esp + 0x10]
add edi, ecx
mov ecx, eax
mov eax, dword [ebp + 0x18]
shl edi, cl
mov ecx, edx
sar eax, cl
mov dword [esp + 0x2c], edi
sub eax, edi
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 0x1c]
sar eax, cl
inc eax
mov dword [esp + 0x20], eax
mov ecx, dword [esi + 0x1c]
mov dword [esp + 0x30], ecx
mov edx, dword [esi + 0x24]
mov dword [esp + 0x38], edx
lea esi, [esp + 0x14]
add ebx, 4
jmp 0x51d894
movzx eax, byte [ebx + 1]
lea ecx, [esp + 0x14]
cmp esi, ecx
je 0x51d7a6
mov ecx, 0xa
lea edi, [esp + 0x14]
rep movsd dword es:[edi], dword [esi]
lea esi, [esp + 0x14]
add dword [esp + 0x30], eax
add ebx, 2
jmp 0x51d894
movzx eax, byte [ebx + 1]
movzx edx, byte [ebx + 2]
shl eax, 8
lea ecx, [esp + 0x14]
add eax, edx
cmp esi, ecx
je 0x51d7d6
mov ecx, 0xa
lea edi, [esp + 0x14]
rep movsd dword es:[edi], dword [esi]
lea esi, [esp + 0x14]
add dword [esp + 0x30], eax
add ebx, 3
jmp 0x51d894
movzx eax, byte [ebx + 1]
movzx edx, byte [ebx + 2]
movzx ecx, byte [ebx + 3]
shl eax, 8
add eax, edx
movzx edx, byte [ebx + 4]
shl eax, 8
add eax, ecx
shl eax, 8
lea ecx, [esp + 0x14]
add eax, edx
cmp esi, ecx
je 0x51d818
mov ecx, 0xa
lea edi, [esp + 0x14]
rep movsd dword es:[edi], dword [esi]
lea esi, [esp + 0x14]
mov dword [esp + 0x30], eax
add ebx, 5
jmp 0x51d894
movzx ecx, byte [ebx + 1]
add ebx, 2
mov dword [esp + eax*4 - 0x148], ecx
jmp 0x51d873
movzx edx, byte [ebx + 1]
movzx ecx, byte [ebx + 2]
shl edx, 8
add edx, ecx
mov dword [esp + eax*4 - 0x158], edx
add ebx, 3
jmp 0x51d873
movzx edx, byte [ebx + 1]
movzx ecx, byte [ebx + 2]
shl edx, 8
add edx, ecx
movzx ecx, byte [ebx + 3]
shl edx, 8
add edx, ecx
movzx ecx, byte [ebx + 4]
shl edx, 8
add edx, ecx
mov dword [esp + eax*4 - 0x168], edx
add ebx, 5
mov eax, dword [esp + 0x38]
lea edx, [esp + 0x14]
cmp esi, edx
je 0x51d88a
mov ecx, 0xa
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov esi, edx
mov dword [esp + 0x38], eax
jmp 0x51d894
mov ebp, dword [esp + 0x10]
movzx eax, byte [ebx]
cmp eax, 0x6b
jbe 0x51d441
mov ecx, dword [0x96185c]
push eax
mov eax, dword [ecx]
push str.unknown_command__i_n
call dword [eax + 4]
push eax
call fcn.0054db90
mov ecx, dword [0x96185c]
mov edx, dword [ecx]
add esp, 0xc
call dword [edx + 4]
mov ecx, eax
call fcn.0054dbf0
mov dword [0], 0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret 8
movzx eax, byte [ebx + 1]
jmp 0x51d931
movzx eax, byte [ebx + 1]
movzx ecx, byte [ebx + 2]
shl eax, 8
add eax, ecx
jmp 0x51d931
movzx eax, byte [ebx + 1]
movzx edx, byte [ebx + 2]
movzx ecx, byte [ebx + 3]
shl eax, 8
add eax, edx
shl eax, 8
add eax, ecx
jmp 0x51d931
movzx eax, byte [ebx + 1]
movzx edx, byte [ebx + 2]
movzx ecx, byte [ebx + 3]
shl eax, 8
add eax, edx
movzx edx, byte [ebx + 4]
shl eax, 8
add eax, ecx
shl eax, 8
add eax, edx
jmp 0x51d931
add eax, 0xffffffd0
mov esi, dword [esi + 0x1c]
mov ebp, dword [ebp]
mov ecx, dword [ebp + 4]
add esi, eax
mov eax, dword [ebp + 8]
and eax, 0x7fffffff
cmp ecx, eax
jne 0x51d953
push 4
push ebp
call fcn.0054d2c0
add esp, 8
mov ecx, dword [ebp + 4]
mov edx, dword [ebp]
mov dword [edx + ecx*4], esi
mov eax, dword [ebp + 4]
pop edi
inc eax
pop esi
mov dword [ebp + 4], eax
pop ebp
pop ebx
add esp, 0x2c
ret 8