Function at 0x580d10
Capabilities:
Enumerate pe sections
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x6a4
mov eax, dword [esp + 0x6a8]
push ebx
push ebp
push esi
mov ebp, dword [eax]
push edi
mov dword [esp + 0x18], ecx
push 0x49545950
mov ebx, dword [ebp + 8]
mov ecx, ebx
mov dword [esp + 0x30], ebp
mov dword [esp + 0x40], ebx
call fcn.005510f0
test eax, eax
je case.0x580d64.3
mov edi, dword [eax + 8]
xor esi, esi
xor ecx, ecx
mov dword [esp + 0x1c], esi
lea eax, [edi - 1]
cmp eax, 0x14
ja case.0x580d64.3
movzx eax, byte [eax + 0x581c28]
jmp dword [eax*4 + 0x581c0c]
mov dword [esp + 0x34], 1
jmp 0x580db6
mov ecx, 4
add ecx, 4
mov dword [esp + 0x34], ecx
mov ecx, ebx
push 0x434f4d50
call fcn.005510f0
test eax, eax
je 0x580db6
mov esi, dword [eax + 8]
mov dword [esp + 0x1c], esi
jmp 0x580db6
mov dword [esp + 0x34], 0x10
jmp 0x580db6
mov dword [esp + 0x34], 0x18
jmp 0x580db6
mov dword [esp + 0x34], 0x20
push 0x414c4641
mov ecx, ebx
mov dword [esp + 0x3c], 0
call fcn.005510f0
test eax, eax
je 0x580dd5
mov eax, dword [eax + 8]
mov dword [esp + 0x38], eax
cmp edi, 5
je 0x580ddf
cmp edi, 9
jne 0x580df1
mov eax, esi
sub eax, 1
je 0x580df1
sub eax, 0x8004
jne case.0x580d64.3
movzx eax, word [ebp + 0x1a]
imul eax, dword [ebp + 0x10]
mov ebx, dword [ebp + 0x10]
mov esi, dword [esp + 0x34]
imul ebx, esi
push 0
add eax, 0x1f
cdq
and edx, 0x1f
add eax, edx
add ebx, 0x1f
sar eax, 5
shl eax, 2
mov dword [esp + 0x34], eax
mov eax, dword [ebp + 0x14]
shr ebx, 5
shl ebx, 2
cdq
push ebx
push edx
push eax
mov dword [esp + 0x60], ebx
call fcn.004b2d70
mov ecx, edx
mov dword [esp + 0x24], eax
mov ebx, eax
mov dword [esp + 0x28], ecx
add ebx, 0x36
mov ebp, ecx
adc ebp, 0
cmp esi, 8
ja 0x580e62
mov ecx, esi
mov edx, 1
shl edx, cl
xor eax, eax
shl edx, 2
add ebx, edx
adc eax, ebp
mov ebp, eax
mov esi, eax
jmp 0x580e7d
mov eax, ebx
mov ecx, ebp
mov dword [esp + 0x44], eax
mov esi, ebp
mov dword [esp + 0x40], ecx
cmp edi, 0x14
jne 0x580e85
add ebx, 0xc
adc ebp, 0
mov esi, ebp
mov dword [esp + 0x40], ebp
mov dword [esp + 0x44], ebx
mov ecx, dword [esp + 0x18]
mov ecx, dword [ecx + 0x38]
mov eax, dword [ecx]
mov eax, dword [eax + 4]
call eax
mov ecx, dword [esp + 0x18]
push ebp
push ebx
mov dword [ecx + 0x40], eax
mov dword [ecx + 0x44], edx
mov ecx, dword [ecx + 0x38]
mov eax, dword [ecx]
call dword [eax + 0x2c]
mov ebp, dword [esp + 0x18]
mov dword [ebp + 0x3c], eax
test eax, eax
js 0x581bfe
mov ecx, dword [esp + 0x40]
neg esi
mov eax, 0x4d42
sbb esi, esi
mov word [esp + 0x58], ax
xor eax, eax
not esi
mov dword [esp + 0x5e], eax
and esi, ebx
mov eax, dword [esp + 0x44]
sub eax, dword [esp + 0x24]
mov dword [esp + 0x5a], esi
sbb ecx, dword [esp + 0x28]
js 0x580ef5
jg 0x580eeb
cmp eax, 0xffffffff
jbe 0x580ef5
mov dword [esp + 0x62], 0xffffffff
jmp 0x580f0d
test ecx, ecx
jg 0x580f09
jl 0x580eff
test eax, eax
jae 0x580f09
mov dword [esp + 0x62], 0
jmp 0x580f0d
mov dword [esp + 0x62], eax
mov ecx, dword [ebp + 0x38]
lea edx, [esp + 0x4c]
push edx
push 0xe
lea edx, [esp + 0x60]
mov eax, dword [ecx]
push edx
call dword [eax + 0x20]
mov dword [ebp + 0x3c], eax
test eax, eax
js 0x581bfe
mov ecx, dword [esp + 0x2c]
mov ebp, 1
mov dword [esp + 0x88], 0
mov dword [esp + 0x8c], 0
mov dword [esp + 0x98], 0
mov dword [esp + 0x9c], 0
mov dword [esp + 0x78], 0x28
mov eax, dword [ecx + 0x10]
mov dword [esp + 0x7c], eax
mov eax, dword [ecx + 0x14]
mov dword [esp + 0x80], eax
mov eax, dword [esp + 0x34]
mov word [esp + 0x84], bp
mov word [esp + 0x86], ax
cmp edi, 0x14
je 0x580fa7
cmp edi, 0x15
jne 0x580fb2
cmp dword [esp + 0x38], 0
je 0x580fb2
mov dword [esp + 0x78], 0x38
mov dword [esp + 0x88], 3
cmp dword [esp + 0x1c], 0x8005
jne 0x580fcc
xor eax, eax
cmp edi, 5
sete al
inc eax
mov dword [esp + 0x88], eax
mov ecx, dword [esp + 0x3c]
xor esi, esi
push 0x44504958
xor ebx, ebx
call fcn.005510f0
test eax, eax
je 0x580fe5
mov esi, dword [eax + 8]
mov ecx, dword [esp + 0x3c]
push 0x44504959
call fcn.005510f0
test eax, eax
je 0x580ffa
mov ebx, dword [eax + 8]
test esi, esi
je 0x581004
test ebx, ebx
jne 0x581008
mov ebx, esi
test ebx, ebx
je 0x58100e
test esi, esi
jne 0x58100e
mov esi, ebx
push 0xfe
push 0x2710
push esi
mov esi, dword [sym.imp.KERNEL32.dll_MulDiv]
call esi
push 0xfe
push 0x2710
push ebx
mov dword [esp + 0x9c], eax
call esi
mov ebx, dword [esp + 0x34]
mov ecx, ebx
shl ebp, cl
mov dword [esp + 0x94], eax
cmp ebx, 8
ja 0x581050
mov dword [esp + 0x98], ebp
mov esi, dword [esp + 0x18]
lea edx, [esp + 0x4c]
push edx
push 0x28
lea edx, [esp + 0x80]
mov ecx, dword [esi + 0x38]
push edx
mov eax, dword [ecx]
call dword [eax + 0x20]
mov dword [esi + 0x3c], eax
test eax, eax
js 0x581bfe
cmp ebx, 8
ja 0x5810b2
mov ecx, dword [esi + 0x38]
mov ebx, dword [esp + 0x2c]
mov eax, dword [ecx]
mov edx, dword [eax + 0x20]
lea eax, [esp + 0x4c]
push eax
lea eax, [ebp*4]
push eax
lea eax, [ebx + 0x34]
push eax
call edx
mov dword [esi + 0x3c], eax
test eax, eax
jns 0x581146
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x6a4
ret 0x10
cmp edi, 0x14
jne 0x5810f7
mov ecx, dword [esi + 0x38]
lea edx, [esp + 0x4c]
push edx
mov dword [esp + 0x6c], 0xf800
lea edx, [esp + 0x6c]
mov dword [esp + 0x70], 0x7e0
mov dword [esp + 0x74], 0x1f
mov eax, dword [ecx]
push 0xc
push edx
call dword [eax + 0x20]
mov dword [esi + 0x3c], eax
test eax, eax
jns 0x581142
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x6a4
ret 0x10
cmp edi, 0x15
jne 0x581142
cmp dword [esp + 0x38], 0
je 0x581142
mov ecx, dword [esi + 0x38]
lea edx, [esp + 0x4c]
push edx
mov dword [esp + 0x6c], 0xff0000
lea edx, [esp + 0x6c]
mov dword [esp + 0x70], 0xff00
mov dword [esp + 0x74], 0xff
mov dword [esp + 0x78], 0xff000000
mov eax, dword [ecx]
push 0x10
push edx
call dword [eax + 0x20]
mov dword [esi + 0x3c], eax
test eax, eax
js 0x581bfe
mov ebx, dword [esp + 0x2c]
mov ecx, dword [esi + 0x38]
mov eax, dword [ecx]
mov eax, dword [eax + 4]
call eax
cmp dword [esp + 0x1c], 0x8005
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], edx
je 0x581178
mov ecx, dword [ebx + 0x14]
dec ecx
imul ecx, dword [esp + 0x50]
add eax, ecx
mov dword [esp + 0x40], eax
adc edx, 0
mov dword [esp + 0x44], edx
push dword [esp + 0x30]
call fcn.004463f0
mov ebp, eax
add esp, 4
mov dword [esp + 0x38], ebp
test ebp, ebp
je 0x5811f4
movzx eax, word [ebx + 0x1a]
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x14], ebp
cmp eax, ecx
jne 0x5811ad
cmp ecx, 0x10
je 0x5811ad
cmp dword [esp + 0x1c], 0x8005
jne 0x581206
cmp dword [esp + 0x1c], 0x8005
mov eax, dword [esp + 0x50]
jne 0x5811d8
mov ecx, dword [ebx + 0x10]
mov eax, ecx
cdq
add ecx, 0x10
and edx, 0x3f
add eax, edx
sar eax, 6
add eax, ecx
mov ecx, dword [esp + 0x50]
cmp eax, ecx
jae 0x5811d8
mov eax, ecx
push eax
call fcn.004463f0
mov ecx, eax
add esp, 4
mov dword [esp + 0x14], ecx
test ecx, ecx
jne 0x581206
push ebp
call fcn.00446420
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 0x826403e8
pop ebx
add esp, 0x6a4
ret 0x10
cmp edi, 0x14
je 0x581214
cmp edi, 0x13
jne 0x5812b2
xor ecx, ecx
mov dword [esp + 0x3c], 0
cmp edi, 0x14
sete cl
sub edi, 0x14
add ecx, 0xa
neg edi
mov dword [esp + 0x24], ecx
sbb edi, edi
xor ebp, ebp
and edi, 0xffffffe0
add edi, 0x3f
xor ebx, ebx
lea esp, [esp]
mov eax, 0x80808081
lea ebx, [ebx + 2]
imul ebp
add edx, ebp
add ebp, 0x1f
sar edx, 7
mov eax, edx
shr eax, 0x1f
add eax, edx
movzx esi, ax
mov ax, si
mov word [esp + ebx + 0xb2], si
shl ax, cl
mov ecx, dword [esp + 0x3c]
mov word [esp + ebx + 0x2b2], ax
mov eax, 0x80808081
imul ecx
add edx, ecx
add ecx, edi
sar edx, 7
mov eax, edx
mov dword [esp + 0x3c], ecx
mov ecx, dword [esp + 0x24]
shr eax, 0x1f
add eax, edx
shl eax, 5
mov word [esp + ebx + 0x4b2], ax
cmp ebp, 0x1f00
jl 0x581240
mov ebp, dword [esp + 0x38]
mov esi, dword [esp + 0x18]
mov ebx, dword [esp + 0x2c]
mov eax, dword [ebx + 0x14]
mov ecx, dword [esi + 0x6c]
push eax
push dword [ebx + 0x10]
push eax
call fcn.005ab930
cmp dword [esp + 0x34], 4
mov edi, dword [ebx + 0x10]
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x10], edi
jne 0x5812ec
cmp eax, 0x8005
je 0x5812ec
mov eax, edi
cdq
sub eax, edx
mov edi, eax
mov eax, dword [esp + 0x1c]
sar edi, 1
mov dword [esp + 0x10], edi
mov dword [esp + 0xa0], 0
mov dword [esp + 0xa4], 0
mov dword [esp + 0xa8], 0
mov dword [esp + 0xac], 0
mov dword [esp + 0xb0], ebp
mov edx, dword [ebx + 0x14]
mov dword [esp + 0x3c], 0
test edx, edx
jle 0x581b1f
jmp 0x581338
mov eax, dword [esp + 0x1c]
cmp eax, 0x8005
je 0x581376
mov ecx, dword [esi + 0x38]
push dword [esp + 0x44]
push dword [esp + 0x44]
mov eax, dword [ecx]
push 0
call dword [eax + 0x18]
mov dword [esi + 0x3c], eax
test eax, eax
js 0x581b1f
mov eax, dword [esp + 0x6c0]
push dword [eax]
mov eax, dword [esp + 0x6c0]
push ebp
mov eax, dword [eax]
call eax
add esp, 8
jmp 0x5813bd
mov ecx, dword [ebx + 0x43c]
lea edi, [esp + 0x24]
sub edx, dword [esp + 0x3c]
push edi
lea edi, [esp + 0xa4]
mov dword [esp + 0x28], 0
mov eax, dword [ecx]
dec edx
push edi
push 5
push edx
call dword [eax + 0x28]
mov edi, dword [esp + 0x10]
test eax, eax
je 0x581b18
mov ecx, dword [ebx + 0x43c]
lea edx, [esp + 0xa0]
push edx
mov eax, dword [ecx]
call dword [eax + 0x24]
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x50]
add eax, 0xfffffffc
mov ebx, edx
mov dword [esp + 0x24], ebx
cmp eax, 0x1c
ja case.0x5813de.5
movzx eax, byte [eax + 0x581c58]
jmp dword [eax*4 + 0x581c40]
cmp dword [esp + 0x1c], 0x8005
jne case.0x5813de.5
mov ecx, dword [esp + 0x10]
xor ebx, ebx
xor edx, edx
xor esi, esi
test ecx, ecx
jle 0x5815c3
inc edx
add edx, esi
cmp edx, ecx
jge 0x58141e
lea esp, [esp]
mov al, byte [edx + ebp]
cmp al, byte [edx + ebp - 1]
je 0x58141e
inc edx
cmp edx, ecx
jl 0x581410
sub edx, esi
dec edx
mov dword [esp + 0x20], edx
cmp edx, 0xfe
jl 0x5814a4
lea eax, [esi + ebp]
mov dword [esp + 0x28], eax
mov eax, 0x2040811
mul edx
mov eax, dword [esp + 0x20]
mov ebp, dword [esp + 0x28]
sub eax, edx
shr eax, 1
add eax, edx
mov edx, dword [esp + 0x14]
shr eax, 7
mov dword [esp + 0x24], eax
imul eax, eax, 0xfe
add esi, eax
sub dword [esp + 0x20], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x30], esi
jmp 0x581470
mov word [edx + ebx], 0xfe00
lea edi, [edx + 2]
add edi, ebx
mov esi, ebp
mov ecx, 0x3f
add ebp, 0xfe
rep movsd dword es:[edi], dword [esi]
add ebx, 0x100
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
sub eax, 1
jne 0x581470
mov edx, dword [esp + 0x20]
mov ebp, dword [esp + 0x38]
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x10]
lea eax, [edx + esi]
lea ecx, [eax + 2]
mov dword [esp + 0x28], eax
cmp ecx, edi
jge 0x5814c8
mov al, byte [ecx + ebp]
cmp al, byte [ecx + ebp - 1]
jne 0x5814c4
inc ecx
cmp ecx, edi
jl 0x5814b6
mov eax, dword [esp + 0x28]
sub ecx, edx
sub ecx, esi
mov dword [esp + 0x24], ecx
cmp eax, edi
jge 0x5814dd
cmp ecx, 2
jl 0x5815b6
mov eax, edx
sub eax, 0
je 0x58156d
sub eax, 1
je 0x581552
sub eax, 1
je 0x581537
mov ecx, dword [esp + 0x14]
lea eax, [esi + ebp]
push edx
push eax
lea eax, [ecx + 2]
mov byte [ebx + ecx], 0
add eax, ebx
mov byte [ebx + ecx + 1], dl
push eax
call fcn.004b3b20
mov eax, dword [esp + 0x2c]
add ebx, 2
mov esi, dword [esp + 0x34]
add esp, 0xc
add ebx, eax
test al, 1
je 0x58152b
mov eax, dword [esp + 0x14]
mov byte [ebx + eax], 0
inc ebx
mov ecx, dword [esp + 0x24]
xor edx, edx
mov dword [esp + 0x20], edx
jmp 0x58156d
mov eax, dword [esp + 0x14]
mov edi, dword [esp + 0x14]
mov byte [ebx + eax], 1
mov al, byte [esi + ebp]
inc esi
mov byte [ebx + edi + 1], al
add ebx, 2
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov byte [ebx + eax], 1
mov al, byte [esi + ebp]
inc esi
mov ebp, dword [esp + 0x14]
mov byte [ebx + ebp + 1], al
add ebx, 2
mov ebp, dword [esp + 0x38]
lea eax, [edx + esi]
cmp eax, edi
jge 0x5815c7
cmp ecx, 2
jl 0x5815b6
add esi, ecx
mov byte [esp + 0x4b], 0xff
test ecx, ecx
jle 0x5815b7
mov dl, byte [esp + 0x4b]
mov edi, dword [esp + 0x14]
lea esp, [esp]
movzx eax, dl
cmp eax, ecx
jle 0x581599
mov dl, cl
mov byte [edi + ebx], dl
mov al, byte [esi + ebp - 1]
mov byte [edi + ebx + 1], al
add ebx, 2
movzx eax, dl
sub ecx, eax
test ecx, ecx
jg 0x581590
mov edx, dword [esp + 0x20]
jmp 0x5815b7
inc edx
mov ecx, dword [esp + 0x10]
cmp esi, ecx
jl 0x581405
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov word [ebx + eax], 0
add ebx, 2
jmp 0x581ab1
cmp dword [esp + 0x1c], 0x8005
jne 0x581916
mov eax, dword [esp + 0x10]
cmp eax, 2
jg 0x58162b
mov ebx, dword [esp + 0x14]
mov byte [ebx + edx], al
mov cl, byte [ebp]
shl cl, 4
mov byte [ebx + edx + 1], cl
cmp eax, 2
jne 0x581611
mov al, byte [ebp + 1]
and al, 0xf
or al, cl
mov byte [ebx + edx + 1], al
mov eax, dword [esp + 0x14]
mov ebx, 2
mov edi, dword [esp + 0x10]
mov word [ebx + eax], 0
add ebx, ebx
jmp case.0x5813de.5
xor esi, esi
xor ebx, ebx
xor edx, edx
mov dword [esp + 0x30], esi
test eax, eax
jle 0x5818fc
lea ecx, [ecx]
lea ecx, [edx + 2]
mov edx, dword [esp + 0x10]
add ecx, esi
cmp ecx, edx
jge 0x58165e
lea ecx, [ecx]
mov al, byte [ecx + ebp]
cmp al, byte [ecx + ebp - 2]
je 0x58165e
inc ecx
cmp ecx, edx
jl 0x581650
sub ecx, esi
xor edx, edx
lea eax, [ecx - 1]
mov ecx, dword [esp + 0x10]
cmp eax, 2
setle dl
dec edx
and edx, eax
lea eax, [esi + 3]
add eax, edx
mov dword [esp + 0x20], edx
cmp eax, ecx
jl 0x581687
mov edx, ecx
sub edx, esi
mov dword [esp + 0x20], edx
cmp edx, 0xfc
jl 0x58176f
mov eax, 0x4104105
lea ecx, [ebp + 3]
mov ebp, dword [esp + 0x14]
add ecx, esi
mov esi, dword [esp + 0x20]
mul edx
mov eax, esi
sub eax, edx
shr eax, 1
add eax, edx
shr eax, 7
mov dword [esp + 0x28], eax
imul eax, eax, 0xfc
add dword [esp + 0x30], eax
sub esi, eax
mov dword [esp + 0x20], esi
jmp 0x5816d0
lea esi, [ebp + 3]
mov word [ebx + ebp], 0xfc00
add esi, ebx
mov edi, 0x15
movzx eax, byte [ecx - 3]
lea esi, [esi + 6]
mov dl, byte [ecx - 2]
and dl, 0xf
shl al, 4
or dl, al
mov byte [esi - 7], dl
movzx eax, byte [ecx]
mov dl, byte [ecx - 1]
and al, 0xf
shl dl, 4
or dl, al
mov byte [esi - 6], dl
movzx eax, byte [ecx + 1]
mov dl, byte [ecx + 2]
and dl, 0xf
shl al, 4
or dl, al
mov byte [esi - 5], dl
movzx eax, byte [ecx + 3]
mov dl, byte [ecx + 4]
and dl, 0xf
shl al, 4
or dl, al
mov byte [esi - 4], dl
movzx eax, byte [ecx + 5]
mov dl, byte [ecx + 6]
and dl, 0xf
shl al, 4
or dl, al
mov byte [esi - 3], dl
mov dl, byte [ecx + 8]
movzx eax, byte [ecx + 7]
and dl, 0xf
shl al, 4
add ecx, 0xc
or dl, al
mov byte [esi - 2], dl
sub edi, 1
jne 0x5816e0
sub ebx, 0xffffff80
sub dword [esp + 0x28], 1
jne 0x5816d0
mov ebp, dword [esp + 0x38]
mov edx, dword [esp + 0x20]
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x10]
lea eax, [edx + esi]
mov dword [esp + 0x28], eax
xor ecx, ecx
add eax, 2
mov dword [esp + 0x24], ecx
cmp eax, edi
jge 0x5817a6
mov ecx, eax
lea esp, [esp]
mov al, byte [ecx + ebp]
cmp al, byte [ecx + ebp - 2]
jne 0x58179e
inc ecx
cmp ecx, edi
jl 0x581790
sub ecx, edx
sub ecx, esi
mov dword [esp + 0x24], ecx
cmp dword [esp + 0x28], edi
jge 0x5817b5
cmp ecx, 2
jl 0x5818f9
mov eax, edx
xor cl, cl
sub eax, 0
je 0x581888
sub eax, 1
je 0x581866
sub eax, 1
je 0x58185f
mov eax, dword [esp + 0x14]
mov byte [ebx + eax], cl
mov byte [ebx + eax + 1], dl
mov eax, edx
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x54], eax
mov esi, eax
js 0x581827
mov edx, dword [esp + 0x30]
lea ecx, [esi + ebx]
mov edi, dword [esp + 0x14]
add edi, 2
add edi, ecx
lea edx, [edx + esi*2]
add edx, ebp
mov cl, byte [edx + 1]
lea edx, [edx - 2]
mov al, byte [edx + 2]
lea edi, [edi - 1]
and cl, 0xf
shl al, 4
or cl, al
sub esi, 1
mov byte [edi + 1], cl
jns 0x581803
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x20]
add ebx, 2
mov esi, dword [esp + 0x28]
add ebx, eax
mov edx, dword [esp + 0x14]
mov dword [esp + 0x30], esi
test cl, 1
je 0x58184d
mov al, byte [esi + ebp - 1]
shl al, 4
mov byte [ebx + edx], al
inc ebx
inc ecx
test cl, 3
je 0x581857
mov byte [ebx + edx], 0
inc ebx
xor edx, edx
mov dword [esp + 0x20], edx
jmp 0x581888
mov cl, byte [esi + ebp + 1]
and cl, 0xf
mov eax, dword [esp + 0x14]
mov byte [ebx + eax], dl
mov al, byte [esi + ebp]
mov esi, dword [esp + 0x28]
shl al, 4
or al, cl
mov dword [esp + 0x30], esi
mov ecx, dword [esp + 0x14]
mov byte [ebx + ecx + 1], al
add ebx, 2
lea eax, [edx + esi]
cmp eax, edi
jg 0x5818e3
mov ecx, dword [esp + 0x24]
cmp ecx, 2
jl 0x5818f9
mov dh, byte [esi + ebp + 1]
mov dl, 0xfe
mov al, byte [esi + ebp]
and dh, 0xf
shl al, 4
add esi, ecx
or dh, al
mov dword [esp + 0x30], esi
test ecx, ecx
jle 0x5818d7
mov ebp, dword [esp + 0x14]
movzx eax, dl
cmp eax, ecx
jle 0x5818c0
mov dl, cl
movzx eax, dl
mov byte [ebx + ebp], dl
sub ecx, eax
mov byte [ebx + ebp + 1], dh
add ebx, 2
test ecx, ecx
jg 0x5818b7
mov ebp, dword [esp + 0x38]
mov edx, dword [esp + 0x20]
cmp esi, edi
jl 0x581640
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
mov word [ebx + eax], 0
add ebx, 2
jmp case.0x5813de.5
inc edx
jmp 0x5818db
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x10]
mov word [ebx + eax], 0
add ebx, 2
jmp case.0x5813de.5
mov edx, dword [esp + 0x10]
xor esi, esi
mov edi, dword [esp + 0x14]
test edx, edx
jle 0x58193c
mov cl, byte [ebp + esi*2 + 1]
mov al, byte [ebp + esi*2]
and cl, 0xf
shl al, 4
or cl, al
mov byte [esi + edi], cl
inc esi
cmp esi, edx
jl 0x581924
mov ecx, dword [esp + 0x2c]
test byte [ecx + 0x10], 1
je 0x581aad
mov al, byte [ebp + esi*2]
shl al, 4
mov byte [esi + edi], al
jmp 0x581aad
mov ecx, dword [esp + 0x2c]
cmp word [ecx + 0x1a], 8
jne 0x5819ae
mov edx, dword [esp + 0x10]
xor esi, esi
test edx, edx
jle 0x581aad
mov ebx, dword [esp + 0x14]
jmp 0x581980
movzx ecx, byte [esi + ebp]
mov ax, word [esp + ecx*2 + 0xb4]
or ax, word [esp + ecx*2 + 0x4b4]
or ax, word [esp + ecx*2 + 0x2b4]
mov word [ebx + esi*2], ax
inc esi
cmp esi, edx
jl 0x581980
mov ebx, dword [esp + 0x24]
jmp 0x581aad
mov dword [esp + 0x54], 0
test edi, edi
jle case.0x5813de.5
mov ebx, dword [esp + 0x14]
lea esi, [ebp + 1]
mov ebp, dword [esp + 0x54]
lea esp, [esp]
movzx eax, byte [esi - 1]
lea esi, [esi + 3]
movzx ecx, byte [esi - 2]
mov dx, word [esp + eax*2 + 0xb4]
movzx eax, byte [esi - 3]
or dx, word [esp + ecx*2 + 0x2b4]
or dx, word [esp + eax*2 + 0x4b4]
mov word [ebx + ebp*2], dx
inc ebp
cmp ebp, edi
jl 0x5819d0
mov ebx, dword [esp + 0x24]
mov ebp, dword [esp + 0x38]
jmp 0x581ab1
mov ecx, dword [esp + 0x2c]
cmp word [ecx + 0x1a], 8
jne case.0x5813de.5
mov ecx, dword [esp + 0x10]
xor esi, esi
test ecx, ecx
jle 0x581aad
mov edx, dword [esp + 0x14]
inc edx
nop
mov al, byte [esi + ebp]
lea edx, [edx + 3]
inc esi
mov byte [edx - 2], al
mov byte [edx - 3], al
mov byte [edx - 4], al
cmp esi, ecx
jl 0x581a30
jmp 0x581aad
mov ecx, dword [esp + 0x2c]
movzx eax, word [ecx + 0x1a]
cmp eax, 8
jne 0x581a7c
mov ecx, dword [esp + 0x10]
xor esi, esi
test ecx, ecx
jle 0x581aad
mov edx, dword [esp + 0x14]
inc edx
mov al, byte [esi + ebp]
lea edx, [edx + 4]
inc esi
mov byte [edx - 3], al
mov byte [edx - 4], al
mov byte [edx - 5], al
mov byte [edx - 2], 0
cmp esi, ecx
jl 0x581a62
jmp 0x581aad
cmp eax, 0x10
jne case.0x5813de.5
mov ecx, dword [esp + 0x10]
xor esi, esi
test ecx, ecx
jle 0x581aad
mov edx, dword [esp + 0x14]
inc edx
mov al, byte [ebp + esi*2]
lea edx, [edx + 4]
mov byte [edx - 3], al
mov byte [edx - 4], al
mov byte [edx - 5], al
movzx eax, byte [ebp + esi*2 + 1]
inc esi
mov byte [edx - 2], al
cmp esi, ecx
jl 0x581a90
mov edi, dword [esp + 0x10]
mov esi, dword [esp + 0x18]
mov ecx, dword [esi + 0x38]
lea edx, [esp + 0x4c]
push edx
push ebx
push dword [esp + 0x1c]
mov eax, dword [ecx]
call dword [eax + 0x20]
mov ebx, dword [esp + 0x1c]
mov dword [esi + 0x3c], eax
test eax, eax
js 0x581b23
cmp ebx, 0x8005
je 0x581ae7
mov eax, dword [esp + 0x50]
sub dword [esp + 0x40], eax
sbb dword [esp + 0x44], 0
mov ecx, dword [esi + 0x6c]
push 1
call fcn.005ab9e0
test eax, eax
je 0x581b0f
mov ebx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x3c]
inc ecx
mov dword [esp + 0x3c], ecx
mov edx, dword [ebx + 0x14]
cmp ecx, edx
jl 0x581334
jmp 0x581b1f
mov dword [esi + 0x3c], 0x826404c7
jmp 0x581b23
mov eax, dword [esp + 0x24]
mov dword [esi + 0x3c], eax
mov ebx, dword [esp + 0x1c]
cmp dword [esi + 0x3c], 0
jl 0x581bc7
cmp ebx, 0x8005
jne 0x581bc7
mov ecx, dword [esi + 0x38]
mov eax, dword [ecx]
mov eax, dword [eax + 4]
call eax
mov ecx, dword [esi + 0x38]
mov edi, edx
mov ebx, eax
push edi
push ebx
mov esi, dword [ecx]
call dword [esi + 0x2c]
mov esi, dword [esp + 0x18]
mov dword [esi + 0x3c], eax
test eax, eax
js 0x581bc7
mov ecx, dword [esi + 0x38]
mov eax, edi
neg eax
push 0
sbb eax, eax
not eax
and eax, ebx
mov dword [esp + 0x5e], eax
mov eax, dword [ecx]
push 0
push 0
call dword [eax + 0x18]
mov dword [esi + 0x3c], eax
test eax, eax
js 0x581bc7
mov ecx, dword [esi + 0x38]
lea edx, [esp + 0x4c]
push edx
push 0xe
lea edx, [esp + 0x60]
mov eax, dword [ecx]
push edx
call dword [eax + 0x20]
mov dword [esi + 0x3c], eax
test eax, eax
js 0x581bc7
sub ebx, dword [esp + 0x62]
lea edx, [esp + 0x4c]
mov ecx, dword [esi + 0x38]
sbb edi, 0
neg edi
push edx
sbb edi, edi
lea edx, [esp + 0x7c]
not edi
and edi, ebx
mov dword [esp + 0x90], edi
mov eax, dword [ecx]
push 0x28
push edx
call dword [eax + 0x20]
mov dword [esi + 0x3c], eax
mov eax, dword [esp + 0x14]
cmp eax, ebp
je 0x581bd8
push eax
call fcn.00446420
add esp, 4
push ebp
call fcn.00446420
mov ecx, dword [esi + 0x6c]
add esp, 4
call fcn.005ab810
mov eax, dword [esi + 0x3c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x6a4
ret 0x10
mov eax, 0x82640011
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x6a4
ret 0x10