Function at 0x586a10
Capabilities:
Enumerate pe sections

Disassembly:
push ecx
push esi
push edi
mov edi, dword [esp + 0x10]
test edi, edi
je 0x587248
mov esi, dword [edi + 0x1c]
test esi, esi
je 0x587248
mov ecx, dword [esp + 0x14]
cmp ecx, 5
ja 0x587248
cmp dword [edi + 0xc], 0
je 0x587240
cmp dword [edi], 0
jne 0x586a50
cmp dword [edi + 4], 0
jne 0x587240
mov eax, dword [esi + 4]
cmp eax, 0x29a
jne 0x586a63
cmp ecx, 4
jne 0x587240
cmp dword [edi + 0x10], 0
jne 0x586a7a
mov eax, dword [str.buffer_error]
mov dword [edi + 0x18], eax
pop edi
mov eax, 0xfffffffb
pop esi
pop ecx
ret
mov edx, dword [esi + 0x28]
push ebx
push ebp
mov dword [esi], edi
mov dword [esp + 0x10], edx
mov dword [esi + 0x28], ecx
mov ebx, 1
cmp eax, 0x2a
jne 0x586d38
mov eax, 2
cmp dword [esi + 0x18], eax
jne 0x586ca2
push 0
push 0
push 0
call fcn.0058e810
mov dword [edi + 0x30], eax
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 8]
mov byte [eax + ecx], 0x1f
add dword [esi + 0x14], ebx
mov eax, dword [esi + 0x14]
mov edx, dword [esi + 8]
mov byte [eax + edx], 0x8b
add dword [esi + 0x14], ebx
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov byte [eax + ecx], 8
add dword [esi + 0x14], ebx
mov eax, dword [esi + 0x1c]
mov ebp, dword [esi + 0x14]
add esp, 0xc
test eax, eax
jne 0x586b73
mov edx, dword [esi + 8]
mov byte [edx + ebp], al
add dword [esi + 0x14], ebx
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov byte [eax + ecx], 0
add dword [esi + 0x14], ebx
mov eax, dword [esi + 0x14]
mov edx, dword [esi + 8]
mov byte [eax + edx], 0
add dword [esi + 0x14], ebx
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov byte [eax + ecx], 0
add dword [esi + 0x14], ebx
mov eax, dword [esi + 0x14]
mov edx, dword [esi + 8]
mov byte [eax + edx], 0
add dword [esi + 0x14], ebx
mov eax, dword [esi + 0x84]
mov ecx, dword [esi + 0x14]
cmp eax, 9
jne 0x586b3a
lea eax, [ebx + 1]
jmp 0x586b51
cmp dword [esi + 0x88], 2
jge 0x586b4c
cmp eax, 2
jl 0x586b4c
xor eax, eax
jmp 0x586b51
mov eax, 4
mov edx, dword [esi + 8]
mov byte [ecx + edx], al
add dword [esi + 0x14], ebx
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov byte [eax + ecx], 0xb
add dword [esi + 0x14], ebx
mov dword [esi + 4], 0x71
jmp 0x586d38
mov edx, dword [eax + 0x24]
mov ecx, dword [eax + 0x2c]
neg edx
sbb dl, dl
and dl, 0x10
neg ecx
sbb cl, cl
and cl, 2
add dl, cl
mov ecx, dword [eax + 0x1c]
neg ecx
sbb cl, cl
and cl, 8
add dl, cl
mov ecx, dword [eax + 0x10]
neg ecx
sbb cl, cl
and cl, 4
add dl, cl
cmp dword [eax], 0
mov ecx, dword [esi + 8]
setne al
add dl, al
mov byte [ecx + ebp], dl
add dword [esi + 0x14], ebx
mov eax, dword [esi + 0x14]
mov edx, dword [esi + 0x1c]
movzx edx, byte [edx + 4]
mov ecx, dword [esi + 8]
mov byte [eax + ecx], dl
add dword [esi + 0x14], ebx
mov ecx, dword [esi + 0x1c]
movzx ecx, byte [ecx + 5]
mov eax, dword [esi + 0x14]
mov edx, dword [esi + 8]
mov byte [eax + edx], cl
add dword [esi + 0x14], ebx
mov edx, dword [esi + 0x1c]
movzx edx, byte [edx + 6]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov byte [eax + ecx], dl
add dword [esi + 0x14], ebx
mov ecx, dword [esi + 0x1c]
movzx ecx, byte [ecx + 7]
mov eax, dword [esi + 0x14]
mov edx, dword [esi + 8]
mov byte [eax + edx], cl
add dword [esi + 0x14], ebx
mov eax, dword [esi + 0x84]
mov ecx, dword [esi + 0x14]
cmp eax, 9
jne 0x586c13
mov eax, 2
jmp 0x586c2a
cmp dword [esi + 0x88], 2
jge 0x586c25
cmp eax, 2
jl 0x586c25
xor eax, eax
jmp 0x586c2a
mov eax, 4
mov edx, dword [esi + 8]
mov byte [ecx + edx], al
add dword [esi + 0x14], ebx
mov ecx, dword [esi + 0x1c]
mov eax, dword [esi + 0x14]
mov cl, byte [ecx + 0xc]
mov edx, dword [esi + 8]
mov byte [eax + edx], cl
add dword [esi + 0x14], ebx
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x10], 0
mov ecx, dword [esi + 0x14]
je 0x586c72
mov al, byte [eax + 0x14]
mov edx, dword [esi + 8]
mov byte [ecx + edx], al
add dword [esi + 0x14], ebx
mov ecx, dword [esi + 0x1c]
mov cl, byte [ecx + 0x15]
mov eax, dword [esi + 0x14]
mov edx, dword [esi + 8]
mov byte [eax + edx], cl
add dword [esi + 0x14], ebx
mov ecx, dword [esi + 0x14]
mov edx, dword [esi + 0x1c]
cmp dword [edx + 0x2c], 0
je 0x586c8f
mov eax, dword [esi + 8]
push ecx
mov ecx, dword [edi + 0x30]
push eax
push ecx
call fcn.0058e810
add esp, 0xc
mov dword [edi + 0x30], eax
mov dword [esi + 0x20], 0
mov dword [esi + 4], 0x45
jmp 0x586d38
mov ecx, dword [esi + 0x30]
sub ecx, 8
shl ecx, 0xc
add ecx, 0x800
cmp dword [esi + 0x88], eax
jge 0x586cd8
mov ebp, dword [esi + 0x84]
cmp ebp, eax
jl 0x586cd8
cmp ebp, 6
jge 0x586ccc
mov eax, ebx
jmp 0x586cda
xor edx, edx
cmp ebp, 6
setne dl
add eax, edx
jmp 0x586cda
xor eax, eax
shl eax, 6
or ecx, eax
cmp dword [esi + 0x6c], 0
je 0x586ce8
or ecx, 0x20
mov eax, 0x8421085
mul ecx
sub ecx, edx
shr ecx, 1
add ecx, edx
shr ecx, 4
add ecx, ebx
mov eax, ecx
shl ecx, 5
sub ecx, eax
mov eax, esi
mov dword [esi + 4], 0x71
call fcn.005855c0
cmp dword [esi + 0x6c], 0
je 0x586d27
movzx ecx, word [edi + 0x32]
call fcn.005855c0
movzx ecx, word [edi + 0x30]
call fcn.005855c0
push 0
push 0
push 0
call fcn.0058e2c0
add esp, 0xc
mov dword [edi + 0x30], eax
cmp dword [esi + 4], 0x45
jne 0x586e09
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x10], 0
je 0x586e02
movzx eax, word [eax + 0x14]
mov ecx, dword [esi + 0x14]
mov dword [esp + 0x18], ecx
cmp dword [esi + 0x20], eax
jae 0x586dc8
nop
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0xc]
jne 0x586da0
mov edx, dword [esi + 0x1c]
cmp dword [edx + 0x2c], 0
je 0x586d8d
cmp eax, ecx
jbe 0x586d8d
sub eax, ecx
push eax
mov eax, dword [esi + 8]
add eax, ecx
mov ecx, dword [edi + 0x30]
push eax
push ecx
call fcn.0058e810
add esp, 0xc
mov dword [edi + 0x30], eax
call fcn.005855f0
mov eax, dword [esi + 0x14]
mov ecx, eax
mov dword [esp + 0x18], ecx
cmp eax, dword [esi + 0xc]
je 0x586dc8
mov edx, dword [esi + 0x1c]
mov ecx, dword [edx + 0x10]
mov edx, dword [esi + 0x20]
mov cl, byte [ecx + edx]
mov ebp, dword [esi + 8]
mov byte [eax + ebp], cl
add dword [esi + 0x14], ebx
add dword [esi + 0x20], ebx
mov edx, dword [esi + 0x1c]
movzx eax, word [edx + 0x14]
mov ecx, dword [esp + 0x18]
cmp dword [esi + 0x20], eax
jb 0x586d60
mov edx, dword [esi + 0x1c]
cmp dword [edx + 0x2c], 0
je 0x586df0
mov eax, dword [esi + 0x14]
cmp eax, ecx
jbe 0x586df0
sub eax, ecx
push eax
mov eax, dword [esi + 8]
add eax, ecx
mov ecx, dword [edi + 0x30]
push eax
push ecx
call fcn.0058e810
add esp, 0xc
mov dword [edi + 0x30], eax
mov edx, dword [esi + 0x1c]
mov eax, dword [esi + 0x20]
cmp eax, dword [edx + 0x14]
jne 0x586e09
mov dword [esi + 0x20], 0
mov dword [esi + 4], 0x49
cmp dword [esi + 4], 0x49
mov ebp, 0x5b
jne 0x586ebb
mov ecx, dword [esi + 0x1c]
cmp dword [ecx + 0x1c], 0
je 0x586eb8
mov edx, dword [esi + 0x14]
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0xc]
jne 0x586e64
mov ecx, dword [esi + 0x1c]
cmp dword [ecx + 0x2c], 0
je 0x586e55
cmp eax, edx
jbe 0x586e55
mov ecx, dword [edi + 0x30]
sub eax, edx
push eax
mov eax, dword [esi + 8]
add eax, edx
push eax
push ecx
call fcn.0058e810
add esp, 0xc
mov dword [edi + 0x30], eax
call fcn.005855f0
mov eax, dword [esi + 0x14]
mov edx, eax
cmp eax, dword [esi + 0xc]
je 0x586e84
mov ecx, dword [esi + 0x20]
mov ebx, dword [esi + 0x1c]
mov ebx, dword [ebx + 0x1c]
movzx ebx, byte [ebx + ecx]
inc ecx
mov dword [esi + 0x20], ecx
mov ecx, dword [esi + 8]
mov byte [eax + ecx], bl
inc dword [esi + 0x14]
test ebx, ebx
jne 0x586e28
jmp 0x586e89
mov ebx, 1
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], 0
je 0x586eb1
mov eax, dword [esi + 0x14]
cmp eax, edx
jbe 0x586eb1
mov ecx, dword [esi + 8]
sub eax, edx
push eax
add ecx, edx
mov edx, dword [edi + 0x30]
push ecx
push edx
call fcn.0058e810
add esp, 0xc
mov dword [edi + 0x30], eax
test ebx, ebx
jne 0x586ebb
mov dword [esi + 0x20], ebx
mov dword [esi + 4], ebp
cmp dword [esi + 4], ebp
mov ebp, 1
jne 0x586f71
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x24], 0
je 0x586f6a
mov edx, dword [esi + 0x14]
lea esp, [esp]
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0xc]
jne 0x586f1c
mov ecx, dword [esi + 0x1c]
cmp dword [ecx + 0x2c], 0
je 0x586f0d
cmp eax, edx
jbe 0x586f0d
mov ecx, dword [edi + 0x30]
sub eax, edx
push eax
mov eax, dword [esi + 8]
add eax, edx
push eax
push ecx
call fcn.0058e810
add esp, 0xc
mov dword [edi + 0x30], eax
call fcn.005855f0
mov eax, dword [esi + 0x14]
mov edx, eax
cmp eax, dword [esi + 0xc]
je 0x586f3c
mov ecx, dword [esi + 0x20]
mov ebx, dword [esi + 0x1c]
mov ebx, dword [ebx + 0x24]
movzx ebx, byte [ebx + ecx]
inc ecx
mov dword [esi + 0x20], ecx
mov ecx, dword [esi + 8]
mov byte [eax + ecx], bl
add dword [esi + 0x14], ebp
test ebx, ebx
jne 0x586ee0
jmp 0x586f3e
mov ebx, ebp
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], 0
je 0x586f66
mov eax, dword [esi + 0x14]
cmp eax, edx
jbe 0x586f66
mov ecx, dword [esi + 8]
sub eax, edx
push eax
add ecx, edx
mov edx, dword [edi + 0x30]
push ecx
push edx
call fcn.0058e810
add esp, 0xc
mov dword [edi + 0x30], eax
test ebx, ebx
jne 0x586f71
mov dword [esi + 4], 0x67
cmp dword [esi + 4], 0x67
jne 0x586fd0
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], 0
je 0x586fc9
mov ecx, dword [esi + 0x14]
add ecx, 2
cmp ecx, dword [esi + 0xc]
jbe 0x586f90
call fcn.005855f0
mov eax, dword [esi + 0x14]
lea edx, [eax + 2]
cmp edx, dword [esi + 0xc]
ja 0x586fd0
movzx edx, byte [edi + 0x30]
mov ecx, dword [esi + 8]
mov byte [eax + ecx], dl
add dword [esi + 0x14], ebp
movzx edx, byte [edi + 0x31]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
push 0
push 0
mov byte [eax + ecx], dl
add dword [esi + 0x14], ebp
push 0
call fcn.0058e810
add esp, 0xc
mov dword [edi + 0x30], eax
mov dword [esi + 4], 0x71
cmp dword [esi + 0x14], 0
je 0x586ff0
call fcn.005855f0
cmp dword [edi + 0x10], 0
jne 0x58703d
mov dword [esi + 0x28], 0xffffffff
pop ebp
pop ebx
pop edi
xor eax, eax
pop esi
pop ecx
ret
cmp dword [edi + 4], 0
jne 0x58703d
mov eax, dword [esp + 0x10]
mov ebx, dword [esp + 0x1c]
xor ecx, ecx
cmp eax, 4
setle cl
lea edx, [eax + eax]
xor eax, eax
dec ecx
and ecx, 9
sub edx, ecx
cmp ebx, 4
setle al
lea ecx, [ebx + ebx]
dec eax
and eax, 9
sub ecx, eax
cmp ecx, edx
jg 0x587041
cmp ebx, 4
je 0x587041
mov edx, dword [str.buffer_error]
pop ebp
pop ebx
mov dword [edi + 0x18], edx
pop edi
mov eax, 0xfffffffb
pop esi
pop ecx
ret
mov ebx, dword [esp + 0x1c]
mov eax, dword [esi + 4]
cmp eax, 0x29a
jne 0x587064
cmp dword [edi + 4], 0
je 0x58706a
mov eax, dword [str.buffer_error]
pop ebp
pop ebx
mov dword [edi + 0x18], eax
pop edi
mov eax, 0xfffffffb
pop esi
pop ecx
ret
cmp dword [edi + 4], 0
jne 0x587083
cmp dword [esi + 0x74], 0
jne 0x587083
test ebx, ebx
je 0x587151
cmp eax, 0x29a
je 0x587151
mov eax, dword [esi + 0x88]
push ebx
cmp eax, 2
jne 0x587099
call fcn.00586840
add esp, 4
jmp 0x5870be
cmp eax, 3
jne 0x5870a8
call fcn.00586550
add esp, 4
jmp 0x5870be
mov eax, dword [esi + 0x84]
lea ecx, [eax + eax*2]
mov edx, dword [ecx*4 + 0x64a150]
push esi
call edx
add esp, 8
cmp eax, 2
je 0x5870c8
cmp eax, 3
jne 0x5870cf
mov dword [esi + 4], 0x29a
test eax, eax
je 0x587227
cmp eax, 2
je 0x587227
cmp eax, ebp
jne 0x587151
cmp ebx, ebp
jne 0x5870f3
push esi
call fcn.0058dfc0
add esp, 4
jmp 0x587142
cmp ebx, 5
je 0x587142
push 0
push 0
push 0
push esi
call fcn.0058df00
add esp, 0x10
cmp ebx, 3
jne 0x587142
mov eax, dword [esi + 0x4c]
mov ecx, dword [esi + 0x44]
xor edx, edx
mov word [ecx + eax*2 - 2], dx
mov eax, dword [esi + 0x4c]
lea ecx, [eax + eax - 2]
push ecx
push edx
mov edx, dword [esi + 0x44]
push edx
call fcn.00593630
add esp, 0xc
cmp dword [esi + 0x74], 0
jne 0x587142
xor eax, eax
mov dword [esi + 0x6c], eax
mov dword [esi + 0x5c], eax
mov dword [esi + 0x16b4], eax
call fcn.005855f0
cmp dword [edi + 0x10], 0
je 0x586fe1
cmp ebx, 4
jne 0x586fe8
mov eax, dword [esi + 0x18]
test eax, eax
jg 0x587169
mov eax, ebp
pop ebp
pop ebx
pop edi
pop esi
pop ecx
ret
cmp eax, 2
jne 0x5871f4
movzx edx, byte [edi + 0x30]
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 8]
mov byte [eax + ecx], dl
add dword [esi + 0x14], ebp
movzx edx, byte [edi + 0x31]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov byte [eax + ecx], dl
add dword [esi + 0x14], ebp
movzx edx, byte [edi + 0x32]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov byte [eax + ecx], dl
add dword [esi + 0x14], ebp
movzx edx, byte [edi + 0x33]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov byte [eax + ecx], dl
add dword [esi + 0x14], ebp
movzx edx, byte [edi + 8]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov byte [eax + ecx], dl
add dword [esi + 0x14], ebp
movzx edx, byte [edi + 9]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov byte [eax + ecx], dl
add dword [esi + 0x14], ebp
movzx edx, byte [edi + 0xa]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov byte [eax + ecx], dl
add dword [esi + 0x14], ebp
movzx edx, byte [edi + 0xb]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov byte [eax + ecx], dl
add dword [esi + 0x14], ebp
jmp 0x587208
movzx ecx, word [edi + 0x32]
mov eax, esi
call fcn.005855c0
movzx ecx, word [edi + 0x30]
call fcn.005855c0
call fcn.005855f0
mov eax, dword [esi + 0x18]
test eax, eax
jle 0x587219
neg eax
mov dword [esi + 0x18], eax
pop ebp
xor eax, eax
cmp dword [esi + 0x14], eax
pop ebx
pop edi
sete al
pop esi
pop ecx
ret
cmp dword [edi + 0x10], 0
jne 0x586fe8
pop ebp
pop ebx
pop edi
mov dword [esi + 0x28], 0xffffffff
xor eax, eax
pop esi
pop ecx
ret
mov eax, dword [str.stream_error]
mov dword [edi + 0x18], eax
pop edi
mov eax, 0xfffffffe
pop esi
pop ecx
ret