Function at 0x586478
Capabilities:
Encode data using base64
Resolve function by parsing pe exports

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x5c
mov ebp, eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x38], ecx
mov eax, dword [esp + 0x74]
mov dword [esp + 4], eax
mov edx, dword [esp + 0x70]
mov dword [esp], edx
xor ecx, ecx
mov edx, 0x3d
mov eax, ebp
call fcn.0058366c
mov dword [esp + 0x28], eax
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x587194
mov ebx, dword [ebp + 0x20]
mov ecx, dword [esp + 0x70]
mov dword [esp + 0x18], ecx
xor eax, eax
mov esi, dword [esp + 0x74]
add esi, 0xc
mov dword [esp + 0x24], esi
lea edx, [ebp + 0x38]
mov dword [esp + 0x40], edx
cmp ebx, 0x7c
je 0x58653e
lea esi, [esi]
cmp dword [esp + 0x1c], ebx
je 0x58653e
cmp ebx, 0x65
je 0x58653e
test eax, eax
je 0x586515
mov eax, dword [ebp + 0x60]
call fcn.00582460
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x587194
mov eax, dword [ebp + 0x60]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x24]
call fcn.00582ad4
mov ebx, dword [ebp + 0x20]
lea eax, [ebx - 0x24]
cmp eax, 0x57
jbe switch.0x00586580
mov dword [ebp + 0x20], 0x65
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x587030
mov ebx, 0x65
mov eax, 1
cmp ebx, 0x7c
jne 0x5864dc
test eax, eax
jne 0x586572
mov ecx, dword [esp + 0x78]
test ecx, ecx
jne 0x586554
mov eax, dword [ebp]
or dword [eax + 8], 0x100
mov eax, dword [ebp + 0x60]
mov edx, dword [esp + 0x74]
mov dword [esp + 4], edx
mov ecx, dword [esp + 0x70]
mov dword [esp], ecx
xor ecx, ecx
mov edx, 0x6e
call fcn.00582580
mov eax, dword [esp + 0x28]
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
jmp dword [eax*4 + 0x62f620]
mov eax, dword [ebp + 0x18]
and eax, 3
dec eax
jne 0x58700c
mov eax, dword [ebp]
or dword [eax + 8], 0x20
movzx edx, word [ebp + 0x24]
mov eax, dword [esp + 0x74]
mov dword [esp], eax
mov ecx, dword [esp + 0x18]
mov eax, ebp
call fcn.0058509c
mov edx, dword [ebp + 0x64]
mov eax, dword [ebp + 0x60]
call fcn.00582814
mov esi, dword [ebp + 0x14]
test esi, esi
je 0x5865f5
mov ebx, dword [ebp + 0x20]
jmp 0x586534
test byte [ebp + 0x18], 0x40
jne 0x587044
mov ecx, 0xffffffff
mov edx, dword [ebp + 0x64]
mov eax, dword [ebp + 0x60]
mov esi, dword [esp + 0x74]
mov dword [esp + 4], esi
mov esi, dword [esp + 0x18]
mov dword [esp], esi
call fcn.00585bb8
mov eax, ebp
call fcn.00583f64
mov dword [esp + 0x2c], 0
xor edi, edi
mov eax, dword [ebp + 0x20]
cmp eax, 0x2b
je 0x587114
jg 0x586f50
cmp eax, 0x2a
jne 0x586f62
cmp word [ebp + 0x24], 1
sbb esi, esi
not esi
add esi, 2
mov dword [esp + 0x20], esi
mov eax, ebp
call fcn.00583f64
mov dword [esp + 0x34], 0x100
mov dword [esp + 0x30], 0
mov ecx, dword [esp + 0x28]
mov al, byte [ecx + 1]
test edi, edi
jne 0x586f89
xor edx, edx
cmp ebx, 0x28
jne 0x586f96
nop
test edi, edi
je 0x587244
mov eax, dword [ebp + 0x60]
call fcn.00582460
mov dword [esp + 0x3c], eax
mov eax, dword [ebp + 0x60]
call fcn.00582460
mov esi, eax
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x5865c4
mov edx, dword [esp + 0x18]
add edx, 0x14
mov eax, dword [ebp + 0x60]
mov ecx, dword [esp + 0x3c]
call fcn.00582b2c
mov eax, dword [ebp + 0x60]
mov ecx, esi
mov edx, dword [esp + 0x24]
call fcn.00582ad4
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x5865c4
mov eax, dword [esp + 0x3c]
mov dword [edi + 0x14], eax
mov dword [edi + 0x18], esi
mov eax, dword [ebp + 0x60]
call fcn.00582460
mov esi, eax
mov eax, dword [ebp + 0x60]
call fcn.00582460
mov dword [esp + 0x3c], eax
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x5865c4
mov eax, dword [ebp + 0x60]
mov dword [esp + 4], esi
mov edx, dword [esp + 0x18]
mov dword [esp], edx
xor ecx, ecx
mov edx, 0x6e
call fcn.00582580
mov eax, dword [ebp + 0x60]
mov ecx, dword [esp + 0x3c]
mov dword [esp + 4], ecx
mov edx, dword [esp + 0x18]
mov dword [esp], edx
xor ecx, ecx
mov edx, 0x6e
call fcn.00582580
mov ecx, dword [ebp + 0x14]
test ecx, ecx
jne 0x5865c4
mov cl, byte [edi + 1]
mov byte [esp + 0x48], cl
movsx edx, cl
or edx, dword [esp + 0x20]
lea eax, [edx*4]
lea ecx, [edx + edx]
and eax, ecx
and eax, 4
and edx, 0xfffffffc
or eax, edx
mov edx, dword [esp + 0x20]
test edx, edx
jne 0x5873fd
mov cl, byte [esp + 0x48]
and ecx, 3
or ecx, eax
mov eax, dword [esp + 0x74]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x18]
mov dword [esp], eax
mov edx, 0x2e
mov eax, ebp
call fcn.0058366c
mov dword [esp + 0x44], eax
mov dword [eax + 0xc], edi
mov eax, dword [esp + 0x28]
movsx ecx, byte [eax + 1]
mov eax, dword [esp + 0x18]
mov dword [esp + 4], eax
mov edx, dword [esp + 0x28]
mov eax, dword [edx + 0x14]
mov dword [esp], eax
mov edx, 0x3d
mov eax, ebp
call fcn.0058366c
mov ecx, dword [esp + 0x28]
mov dword [ecx + 0xc], eax
mov byte [ecx], 0x2e
mov eax, dword [esp + 0x44]
mov dword [ecx + 0x10], eax
cmp ebx, 0x62
je 0x587641
mov eax, dword [esp + 0x30]
test eax, eax
je 0x587451
mov ecx, dword [esp + 0x44]
add ecx, 0xc
mov dword [esp + 0x2c], ecx
cmp dword [esp + 0x30], 1
jne 0x5867f1
cmp dword [esp + 0x34], 1
je 0x5876c7
mov dword [esp + 0x30], 1
mov edx, dword [edi + 0x14]
mov ecx, dword [edi + 0x18]
mov eax, dword [ebp + 0x60]
mov dword [esp + 4], edx
mov dword [esp], esi
call fcn.00582cd8
cmp dword [esp + 0x34], 0x100
je 0x586814
dec dword [esp + 0x34]
mov ecx, dword [edi + 0x14]
mov eax, dword [esp + 0x34]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x30]
dec eax
mov dword [esp], eax
mov edx, esi
mov eax, ebp
call fcn.0058616c
mov bl, byte [edi + 1]
movsx edx, bl
or edx, dword [esp + 0x20]
lea eax, [edx*4]
lea ecx, [edx + edx]
and eax, ecx
and eax, 4
and edx, 0xfffffffc
or eax, edx
mov edx, dword [esp + 0x20]
test edx, edx
jne 0x58685f
mov edx, ebx
and edx, 3
mov dword [esp + 0x20], edx
or eax, dword [esp + 0x20]
mov dword [esp + 0x20], eax
mov eax, dword [edi + 0x18]
mov dword [esp + 4], eax
mov dword [esp], esi
mov ecx, dword [esp + 0x20]
mov edx, 0x2e
mov eax, ebp
call fcn.0058366c
mov ebx, eax
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x5865c4
mov ecx, dword [esp + 0x20]
and ecx, 3
mov eax, dword [edi + 0x14]
mov dword [esp + 4], eax
mov dword [esp], esi
mov edx, 0x3d
mov eax, ebp
call fcn.0058366c
mov dword [ebx + 0xc], eax
mov esi, dword [ebp + 0x14]
test esi, esi
jne 0x5865c4
mov dword [ebx + 0x10], edi
mov esi, dword [esp + 0x2c]
mov dword [esi], ebx
mov eax, dword [esp + 0x28]
mov ebx, dword [eax + 0x10]
mov eax, dword [ebp + 0x20]
cmp eax, 0x7c
je 0x5875f7
cmp dword [esp + 0x1c], eax
je 0x5875f7
cmp eax, 0x65
je 0x5875f7
mov dword [esp + 8], 1
mov edx, dword [esp + 0x74]
mov dword [esp + 4], edx
mov eax, dword [edi + 0x18]
mov dword [esp], eax
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x1c]
mov eax, ebp
call fcn.00586478
mov dword [ebx + 0x10], eax
mov dl, byte [ebx + 1]
movzx esi, byte [eax + 1]
mov ecx, esi
or ecx, edx
mov edi, 0xfffffffc
and edi, ecx
movsx ecx, cl
lea eax, [ecx*4]
shl ecx, 1
and eax, ecx
and eax, 4
mov cl, dl
and ecx, 3
jne 0x58693f
mov ecx, esi
and ecx, 3
or edx, edi
or edx, eax
or edx, ecx
mov byte [ebx + 1], dl
mov ecx, dword [esp + 0x28]
mov al, byte [ecx + 1]
mov bl, dl
or ebx, eax
mov esi, 0xfffffffc
and esi, ebx
movsx ebx, bl
lea ecx, [ebx*4]
shl ebx, 1
and ecx, ebx
and ecx, 4
mov bl, al
and ebx, 3
jne 0x586977
mov bl, dl
and ebx, 3
or eax, esi
or eax, ecx
or eax, ebx
mov esi, dword [esp + 0x28]
mov byte [esi + 1], al
jmp 0x5865c4
cmp dword [esp + 0x38], 0x4c
je 0x5871c4
mov eax, dword [ebp + 0x14]
movzx edx, word [ebp + 0x24]
cmp edx, dword [ebp + 0x34]
jb 0x5870a0
mov dword [ebp + 0x20], 0x65
test eax, eax
jne 0x5869bb
mov dword [ebp + 0x14], 6
mov al, 6
mov ecx, dword [ebp + 0x30]
mov edx, dword [ecx + edx*4]
test edx, edx
jne 0x5865c4
mov dword [ebp + 0x20], 0x65
test eax, eax
jne 0x58652f
mov dword [ebp + 0x14], 6
jmp 0x58652f
mov eax, ebp
call fcn.00585a94
mov eax, dword [ebp + 0x60]
call fcn.00582460
mov ebx, eax
mov edi, dword [ebp + 0x14]
test edi, edi
jne 0x5865c4
mov dword [esp], eax
mov ecx, dword [esp + 0x18]
mov edx, 0x72
mov eax, ebp
call fcn.00582798
mov eax, dword [ebp + 0x6c]
mov edx, dword [eax + 0x14]
mov eax, dword [ebp + 0x60]
mov dword [esp + 4], 0x61
mov ecx, dword [esp + 0x74]
mov dword [esp], ecx
mov ecx, ebx
call fcn.00582c98
mov ebx, dword [ebp + 0x20]
jmp 0x586534
mov dword [ebp + 0x20], 0x65
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x58652f
mov dword [ebp + 0x14], 0xd
mov ebx, 0x65
jmp 0x586534
cmp dword [esp + 0x38], 0x4c
je 0x5871a8
movzx eax, word [ebp + 0x24]
mov dword [esp + 0x20], eax
test eax, eax
je 0x587230
mov edx, dword [ebp + 0x2c]
inc edx
mov dword [esp + 0x2c], edx
mov dword [ebp + 0x2c], edx
cmp edx, dword [ebp + 0x34]
jae 0x587273
mov eax, ebp
call fcn.00583f64
mov eax, dword [ebp + 0x60]
call fcn.00582460
mov esi, eax
mov eax, dword [ebp + 0x60]
call fcn.00582460
mov edi, eax
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x5865c4
mov eax, dword [ebp + 0x60]
mov dword [esp + 4], esi
mov edx, dword [esp + 0x18]
mov dword [esp], edx
xor ecx, ecx
mov edx, 0x6e
call fcn.00582580
mov eax, dword [ebp + 0x60]
mov ecx, dword [esp + 0x74]
mov dword [esp + 4], ecx
mov dword [esp], edi
xor ecx, ecx
mov edx, 0x6e
call fcn.00582580
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x5865c4
mov dword [esp + 4], edi
mov dword [esp], esi
mov ecx, 0x70
mov edx, 0x29
mov eax, ebp
call fcn.005876f0
mov edi, eax
mov eax, ebp
call fcn.00583f64
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x5865c4
mov eax, dword [esp + 0x20]
test eax, eax
je 0x586606
mov eax, dword [ebp + 0x30]
mov esi, dword [esp + 0x2c]
mov dword [eax + esi*4], edi
mov al, byte [edi + 1]
or eax, 8
movsx ecx, al
mov eax, dword [esp + 0x74]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x18]
mov dword [esp], eax
mov edx, 0x28
mov eax, ebp
call fcn.0058366c
mov esi, dword [ebp + 0x14]
test esi, esi
jne 0x5865c4
mov edx, dword [esp + 0x2c]
mov dword [eax + 4], edx
mov dword [eax + 0xc], edi
mov edi, eax
jmp 0x586606
mov eax, dword [ebp + 0x60]
mov ecx, dword [esp + 0x74]
mov dword [esp + 4], ecx
mov esi, dword [esp + 0x18]
mov dword [esp], esi
mov ecx, 1
mov edx, 0x24
call fcn.00582580
test byte [ebp + 0x18], 0x80
jne 0x587050
mov eax, ebp
call fcn.00583f64
mov ebx, dword [ebp + 0x20]
jmp 0x586534
mov eax, ebp
call fcn.00585a94
mov eax, dword [ebp + 0x60]
call fcn.00582460
mov ebx, eax
mov esi, dword [ebp + 0x14]
test esi, esi
jne 0x5865c4
mov dword [esp], eax
mov ecx, dword [esp + 0x18]
mov edx, 0x72
mov eax, ebp
call fcn.00582798
mov eax, dword [ebp + 0x6c]
mov edx, dword [eax + 0x14]
mov eax, dword [ebp + 0x60]
mov dword [esp + 4], 0x61
mov ecx, dword [esp + 0x74]
mov dword [esp], ecx
mov ecx, ebx
call fcn.00582c98
jmp 0x586dc7
mov eax, ebp
call fcn.00585a94
mov eax, dword [ebp + 0x60]
call fcn.00582460
mov ebx, eax
mov edx, dword [ebp + 0x14]
test edx, edx
jne 0x5865c4
mov eax, dword [ebp + 0x6c]
mov edx, dword [eax + 0x14]
mov eax, dword [ebp + 0x60]
mov dword [esp + 4], 0x72
mov dword [esp], ebx
mov ecx, dword [esp + 0x18]
call fcn.00582c98
mov eax, dword [ebp + 0x6c]
mov edx, dword [eax + 0x14]
mov eax, dword [ebp + 0x60]
mov dword [esp + 4], 0x61
mov ecx, dword [esp + 0x74]
mov dword [esp], ecx
mov ecx, ebx
call fcn.00582c98
mov eax, dword [ebp + 0x60]
call fcn.00582460
mov ebx, eax
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x5865c4
mov dword [esp], ebx
mov ecx, dword [esp + 0x18]
mov edx, 0x72
mov eax, ebp
call fcn.00582798
jmp 0x586df9
movzx edi, word [ebp + 0x24]
mov eax, ebp
call fcn.00583f64
mov eax, dword [ebp + 0x60]
call fcn.00582460
mov esi, eax
mov eax, dword [ebp + 0x60]
call fcn.00582460
mov ebx, eax
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x5865c4
mov dword [esp + 4], ebx
mov dword [esp], esi
mov ecx, 0x4c
mov edx, 0x29
mov eax, ebp
call fcn.005876f0
mov edx, eax
mov eax, ebp
call fcn.005817a8
mov eax, ebp
call fcn.00583f64
mov eax, dword [ebp + 0x8c]
test eax, eax
je 0x587208
inc eax
mov edx, eax
shl edx, 6
lea eax, [edx + eax*4]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0x88]
mov dword [esp], eax
call fcn.004ee090
mov dword [ebp + 0x88], eax
mov ecx, dword [ebp + 0x8c]
lea edx, [ecx + 1]
mov dword [ebp + 0x8c], edx
test eax, eax
je 0x5873df
mov edx, ecx
shl edx, 6
lea edx, [edx + ecx*4]
add eax, edx
mov dword [eax + 0x14], esi
mov dword [eax + 0x18], ebx
mov dword [eax + 4], edi
mov dword [eax + 0x1c], 0
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x5865c4
mov eax, dword [ebp + 0x60]
mov edx, dword [esp + 0x74]
mov dword [esp + 4], edx
mov esi, dword [esp + 0x18]
mov dword [esp], esi
mov edx, 0x4c
call fcn.00582580
mov ebx, dword [ebp + 0x20]
jmp 0x586534
mov eax, dword [ebp + 0x60]
mov ecx, dword [esp + 0x74]
mov dword [esp + 4], ecx
mov esi, dword [esp + 0x18]
mov dword [esp], esi
mov ecx, 1
mov edx, 0x5e
call fcn.00582580
mov eax, dword [ebp + 0x60]
mov edx, dword [esp + 0x74]
mov dword [esp + 4], edx
mov dword [esp], esi
xor ecx, ecx
mov edx, 0x5e
call fcn.00582580
mov eax, ebp
call fcn.00583f64
mov ebx, dword [ebp + 0x20]
jmp 0x586534
mov eax, ebp
call fcn.00585a94
mov eax, dword [ebp + 0x60]
call fcn.00582460
mov ebx, eax
mov ecx, dword [ebp + 0x14]
test ecx, ecx
jne 0x5865c4
mov eax, dword [ebp + 0x6c]
mov edx, dword [eax + 0x14]
mov eax, dword [ebp + 0x60]
mov dword [esp + 4], 0x72
mov dword [esp], ebx
mov ecx, dword [esp + 0x18]
call fcn.00582c98
mov esi, dword [esp + 0x74]
mov dword [esp], esi
mov ecx, ebx
mov edx, 0x61
mov eax, ebp
call fcn.00582798
mov ebx, dword [ebp + 0x20]
jmp 0x586534
cmp word [ebp + 0x24], 1
je 0x5871e4
mov eax, dword [ebp + 0x60]
call fcn.00582460
mov esi, eax
mov eax, dword [ebp + 0x60]
call fcn.00582460
mov edi, eax
mov ecx, dword [ebp + 0x14]
test ecx, ecx
jne 0x5865f5
mov ecx, eax
mov edx, esi
mov eax, ebp
call fcn.005850f4
test byte [ebp + 0x18], 0x40
jne 0x587322
mov edx, dword [ebp + 0x14]
test edx, edx
jne 0x5865f5
mov edx, dword [ebp + 0x64]
mov eax, dword [ebp + 0x60]
mov ecx, dword [esp + 0x74]
mov dword [esp + 8], ecx
mov ecx, dword [esp + 0x18]
mov dword [esp + 4], ecx
mov dword [esp], esi
mov ecx, 0x70
call fcn.00582704
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x5865f5
mov eax, dword [ebp + 0x60]
mov edx, esi
call fcn.00582118
mov eax, dword [ebp + 0x60]
mov edx, edi
call fcn.00581660
jmp 0x5865f5
mov eax, dword [ebp + 0x60]
mov ecx, dword [esp + 0x74]
mov dword [esp + 4], ecx
mov esi, dword [esp + 0x18]
mov dword [esp], esi
mov ecx, 1
mov edx, 0x24
call fcn.00582580
mov eax, dword [ebp + 0x60]
mov edx, dword [esp + 0x74]
mov dword [esp + 4], edx
mov dword [esp], esi
xor ecx, ecx
mov edx, 0x24
call fcn.00582580
mov eax, ebp
call fcn.00583f64
mov ebx, dword [ebp + 0x20]
jmp 0x586534
mov eax, dword [ebp + 0x60]
mov ecx, dword [esp + 0x74]
mov dword [esp + 4], ecx
mov esi, dword [esp + 0x18]
mov dword [esp], esi
mov ecx, 1
mov edx, 0x5e
call fcn.00582580
test byte [ebp + 0x18], 0x80
je 0x586ba3
movsx ecx, word [ebp + 0x68]
mov eax, dword [ebp + 0x60]
mov edx, dword [esp + 0x74]
mov dword [esp + 4], edx
mov dword [esp], esi
mov edx, 0x72
call fcn.00582580
mov eax, ebp
call fcn.00583f64
mov ebx, dword [ebp + 0x20]
jmp 0x586534
cmp eax, 0x3f
je 0x58707c
cmp eax, 0x7b
je 0x587138
mov dword [esp + 0x20], 0
mov dword [esp + 0x34], 1
mov dword [esp + 0x30], 1
mov ecx, dword [esp + 0x28]
mov al, byte [ecx + 1]
test edi, edi
je 0x586657
movsx edx, byte [edi + 1]
cmp ebx, 0x28
je 0x586664
cmp ebx, 0x62
je 0x586664
movsx esi, al
or esi, dword [esp + 0x20]
or esi, edx
lea eax, [esi*4]
lea edx, [esi + esi]
and eax, edx
and eax, 4
mov edx, esi
and edx, 0x1c
or edx, eax
jne 0x586664
cmp dword [esp + 0x30], 1
je 0x5871f8
mov eax, dword [esp + 0x34]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x30]
mov dword [esp], eax
mov ecx, dword [esp + 0x74]
mov edx, dword [esp + 0x18]
mov eax, ebp
call fcn.0058616c
test edi, edi
je 0x586ffa
mov edx, edi
mov eax, ebp
call fcn.005817a8
mov edx, esi
mov eax, dword [esp + 0x28]
mov byte [eax + 1], dl
mov ebx, dword [ebp + 0x20]
jmp 0x586534
mov dword [ebp + 0x20], 0x65
mov edi, dword [ebp + 0x14]
test edi, edi
jne 0x58652f
mov dword [ebp + 0x14], 8
mov ebx, 0x65
jmp 0x586534
mov dword [ebp + 0x14], 0xf
mov ebx, 0x65
jmp 0x586534
movsx ecx, word [ebp + 0x68]
jmp 0x5865db
movsx ecx, word [ebp + 0x68]
mov eax, dword [ebp + 0x60]
mov edx, dword [esp + 0x74]
mov dword [esp + 4], edx
mov dword [esp], esi
mov edx, 0x61
call fcn.00582580
mov eax, ebp
call fcn.00583f64
mov ebx, dword [ebp + 0x20]
jmp 0x586534
cmp word [ebp + 0x24], 1
sbb esi, esi
not esi
add esi, 2
mov dword [esp + 0x20], esi
mov eax, ebp
call fcn.00583f64
mov dword [esp + 0x34], 1
jmp 0x586640
mov ecx, dword [ebp + 0x30]
mov ecx, dword [ecx + edx*4]
test ecx, ecx
je 0x5869c9
test eax, eax
jne 0x5865c4
mov ecx, dword [esp + 0x74]
mov dword [esp + 4], ecx
mov eax, dword [esp + 0x18]
mov dword [esp], eax
mov ecx, 0x10
mov edx, 0x62
mov eax, ebp
call fcn.0058366c
mov edi, eax
movzx edx, word [ebp + 0x24]
mov dword [esp + 0x2c], edx
mov dword [eax + 4], edx
mov eax, dword [ebp + 0x60]
mov ecx, dword [esp + 0x74]
mov dword [esp + 4], ecx
mov esi, dword [esp + 0x18]
mov dword [esp], esi
xor ecx, ecx
mov edx, 0x6e
call fcn.00582580
mov eax, ebp
call fcn.00583f64
mov eax, dword [ebp + 0x20]
cmp eax, 0x2b
jne 0x586612
cmp word [ebp + 0x24], 1
sbb esi, esi
not esi
add esi, 2
mov dword [esp + 0x20], esi
mov eax, ebp
call fcn.00583f64
mov dword [esp + 0x34], 0x100
jmp 0x586f72
mov eax, ebp
call fcn.00583f64
mov eax, ebp
call fcn.00584ce0
mov dword [esp + 0x30], eax
mov eax, dword [ebp + 0x20]
cmp eax, 0x2c
je 0x5872d8
mov edx, dword [esp + 0x30]
mov dword [esp + 0x34], edx
mov dword [esp + 0x20], 0
cmp eax, 0x7d
je 0x58733f
mov dword [ebp + 0x20], 0x65
mov edx, dword [ebp + 0x14]
test edx, edx
jne 0x58652f
mov dword [ebp + 0x14], 0xa
mov ebx, 0x65
jmp 0x586534
mov dword [esp + 0x28], 0
mov eax, dword [esp + 0x28]
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x20], 0
mov ebx, 0x70
mov dword [esp + 0x2c], 0
jmp 0x586a8f
mov dword [ebp + 0x20], 0x65
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x58699a
mov dword [ebp + 0x14], 6
mov al, 6
jmp 0x58699a
mov ecx, dword [esp + 0x74]
mov edx, dword [esp + 0x18]
mov eax, ebp
call fcn.005850f4
jmp 0x5865f5
cmp dword [esp + 0x34], 1
jne 0x586fcf
jmp 0x586fed
mov dword [esp], 0x88
call fcn.004edfec
mov dword [ebp + 0x88], eax
mov dword [ebp + 0x8c], 2
mov ecx, 1
jmp 0x586d20
mov ebx, 0x70
mov dword [esp + 0x2c], 0
jmp 0x586a8f
mov edx, dword [esp + 0x74]
mov dword [esp + 4], edx
mov eax, dword [esp + 0x18]
mov dword [esp], eax
xor ecx, ecx
mov edx, 0x3d
mov eax, ebp
call fcn.0058366c
mov edi, eax
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x58666c
jmp 0x5865c4
lea edx, [edx + edx*2]
shr edx, 1
inc edx
mov eax, dword [ebp + 0x30]
cmp eax, dword [esp + 0x40]
je 0x587424
lea ecx, [edx*4]
mov dword [esp + 4], ecx
mov dword [esp], eax
mov dword [esp + 0x14], edx
call fcn.004ee090
test eax, eax
mov edx, dword [esp + 0x14]
je 0x587406
mov dword [ebp + 0x30], eax
mov ecx, dword [ebp + 0x34]
lea eax, [eax + ecx*4]
cmp edx, ecx
jbe 0x586a8f
mov esi, ecx
neg esi
lea eax, [eax + esi*4]
lea esi, [esi]
mov dword [eax + ecx*4], 0
inc ecx
cmp edx, ecx
jne 0x5872c4
mov dword [ebp + 0x34], edx
jmp 0x586a8f
mov eax, ebp
call fcn.00583f64
test eax, eax
je 0x5873c7
cmp dword [ebp + 0x20], 0x64
je 0x5876b7
mov dword [esp + 0x34], 0x100
mov eax, dword [esp + 0x34]
cmp dword [esp + 0x30], eax
jg 0x58716f
cmp word [ebp + 0x24], 0
mov eax, dword [ebp + 0x20]
je 0x5875ea
mov dword [esp + 0x20], 1
jmp 0x587166
movsx ecx, word [ebp + 0x68]
mov eax, dword [ebp + 0x60]
mov dword [esp + 4], edi
mov dword [esp], esi
mov edx, 0x70
call fcn.00582580
jmp 0x586e57
mov eax, ebp
call fcn.00583f64
mov eax, dword [esp + 0x30]
test eax, eax
jne 0x586f7a
mov eax, dword [esp + 0x34]
test eax, eax
jne 0x586f7a
test edi, edi
je 0x58736b
mov edx, edi
mov eax, ebp
call fcn.005817a8
cmp ebx, 0x28
jne 0x58737e
mov eax, dword [ebp + 0x30]
mov ecx, dword [esp + 0x2c]
mov dword [eax + ecx*4], 0
mov eax, dword [ebp + 0x60]
mov esi, dword [esp + 0x74]
mov dword [esi + 0x1c], esi
mov ecx, dword [esp + 0x18]
mov edx, ecx
call fcn.00582170
mov dword [esi + 0x1c], 0
mov eax, dword [esp + 0x18]
mov dword [eax + 0x1c], 0
mov eax, dword [ebp + 0x60]
mov dword [esp + 4], esi
mov edx, dword [esp + 0x18]
mov dword [esp], edx
xor ecx, ecx
mov edx, 0x6e
call fcn.00582580
mov ebx, dword [ebp + 0x20]
jmp 0x586534
mov eax, dword [ebp + 0x20]
mov edx, dword [esp + 0x30]
mov dword [esp + 0x34], edx
mov dword [esp + 0x20], 0
jmp 0x587166
mov dword [ebp + 0x20], 0x65
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x58652f
mov dword [ebp + 0x14], 0xc
jmp 0x58652f
mov ecx, dword [esp + 0x20]
jmp 0x58675c
mov dword [ebp + 0x20], 0x65
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x586a8f
mov dword [ebp + 0x14], 0xc
jmp 0x586a8f
lea eax, [edx*4]
mov dword [esp], eax
mov dword [esp + 0x14], edx
call fcn.004edfec
test eax, eax
mov edx, dword [esp + 0x14]
je 0x587406
mov ecx, dword [ebp + 0x34]
shl ecx, 2
mov esi, dword [ebp + 0x30]
mov edi, eax
rep movsb byte es:[edi], byte [esi]
jmp 0x5872a9
mov eax, dword [ebp + 0x60]
mov edx, dword [edi + 0x18]
mov dword [esp + 4], edx
mov edx, dword [esp + 0x3c]
mov dword [esp], edx
xor ecx, ecx
mov edx, 0x6e
call fcn.00582580
mov cl, byte [edi + 1]
mov byte [esp + 0x30], cl
movsx edx, cl
or edx, dword [esp + 0x20]
lea eax, [edx*4]
lea ecx, [edx + edx]
and eax, ecx
and eax, 4
and edx, 0xfffffffc
or eax, edx
mov edx, dword [esp + 0x20]
test edx, edx
jne 0x587638
mov dl, byte [esp + 0x30]
and edx, 3
or eax, edx
mov dword [esp + 0x30], eax
mov eax, dword [edi + 0x18]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x18]
mov dword [esp], eax
mov ecx, dword [esp + 0x30]
mov edx, 0x7c
mov eax, ebp
call fcn.0058366c
mov dword [esp + 0x2c], eax
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x5865c4
mov eax, dword [esp + 0x2c]
mov dword [eax + 0xc], edi
mov ecx, dword [esp + 0x30]
and ecx, 3
mov eax, dword [edi + 0x18]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x3c]
mov dword [esp], eax
mov edx, 0x7c
mov eax, ebp
call fcn.0058366c
mov dword [esp + 0x30], eax
mov edx, dword [esp + 0x2c]
mov dword [edx + 0x10], eax
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x5865c4
mov eax, dword [edi + 0x18]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x3c]
mov dword [esp], eax
xor ecx, ecx
mov edx, 0x3d
mov eax, ebp
call fcn.0058366c
mov edx, dword [esp + 0x30]
mov dword [edx + 0xc], eax
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x5865c4
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x44]
mov dword [eax + 0xc], edx
add edx, 0xc
mov dword [esp + 0x2c], edx
cmp ebx, 0x62
jne 0x5867de
mov ebx, 1
mov dword [esp + 0x30], 1
mov eax, dword [ebp + 0x60]
mov edx, dword [edi + 0x14]
mov dword [esp + 4], edx
mov dword [esp], esi
xor ecx, ecx
mov edx, 0x6e
call fcn.00582580
mov ecx, dword [edi + 0x18]
mov edx, dword [edi + 0x14]
mov eax, dword [esp + 0x34]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x30]
mov dword [esp], eax
mov eax, ebp
call fcn.0058616c
mov word [edi + 8], bx
mov edx, dword [esp + 0x34]
mov word [edi + 0xa], dx
mov al, byte [edi + 1]
mov cl, byte [esp + 0x20]
or ecx, eax
and ecx, 0xfffffffc
movsx edx, al
or edx, dword [esp + 0x20]
lea ebx, [edx*4]
shl edx, 1
and edx, ebx
and edx, 4
mov ebx, dword [esp + 0x20]
test ebx, ebx
je 0x5876e5
mov bl, byte [esp + 0x20]
or eax, ecx
or eax, edx
or eax, ebx
mov byte [edi + 1], al
jmp 0x5868c2
mov dword [esp + 0x20], 2
jmp 0x587166
mov eax, dword [ebp + 0x60]
mov ecx, dword [esp + 0x74]
mov dword [esp + 4], ecx
mov edx, dword [edi + 0x18]
mov dword [esp], edx
xor ecx, ecx
mov edx, 0x6e
call fcn.00582580
mov esi, dword [esp + 0x74]
mov dword [esp + 4], esi
mov eax, dword [edi + 0x18]
mov dword [esp], eax
xor ecx, ecx
mov edx, 0x3d
mov eax, ebp
call fcn.0058366c
mov dword [ebx + 0x10], eax
jmp 0x586910
mov edx, dword [esp + 0x20]
jmp 0x5874a3
mov edx, dword [edi + 0x18]
mov dword [esp + 0x48], edx
mov ecx, dword [edi + 0x14]
mov dword [esp + 0x4c], ecx
mov eax, dword [ebp + 0x60]
mov dword [edx + 0x1c], edx
mov edx, ecx
call fcn.00582170
mov eax, dword [esp + 0x48]
mov dword [eax + 0x1c], 0
mov edx, dword [esp + 0x4c]
mov dword [edx + 0x1c], 0
mov eax, dword [ebp + 0x30]
mov ecx, dword [esp + 0x2c]
mov eax, dword [eax + ecx*4]
mov ecx, dword [eax + 0x18]
mov edx, dword [eax + 0x14]
mov eax, dword [edi + 0x18]
mov dword [esp + 4], eax
mov eax, dword [edi + 0x14]
mov dword [esp], eax
mov eax, dword [ebp + 0x60]
call fcn.00582cd8
mov ecx, dword [ebp + 0x14]
test ecx, ecx
jne 0x5865c4
mov eax, dword [esp + 0x30]
test eax, eax
je 0x587451
mov ebx, dword [esp + 0x30]
jmp 0x58756a
mov eax, ebp
call fcn.00584ce0
mov dword [esp + 0x34], eax
jmp 0x5872f9
mov eax, dword [ebp + 0x60]
mov edx, dword [edi + 0x14]
mov dword [esp + 4], edx
mov dword [esp], esi
xor ecx, ecx
mov edx, 0x6e
call fcn.00582580
jmp 0x5868c2
mov bl, al
and ebx, 3
jmp 0x5875dc