Function at 0x404470
Capabilities:
Encrypt data using speck
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xa4
mov eax, dword [ebp + 0x24]
mov dl, byte [ebp + 0x18]
push ebx
mov ebx, dword [ebp + 0x1c]
push esi
push edi
mov dword [esp + 0x20], 0x3fff
cmp eax, 0xffc3d44f
je 0x4044aa
cmp eax, 0xffc3d44e
je 0x4044aa
mov byte [esp + 0xd], 0
cmp eax, 0xffc3d44d
jne 0x4044af
mov byte [esp + 0xd], 1
mov ecx, dword [0x4a14b4]
test ecx, ecx
jne 0x4044c6
lea edi, [esp + 0x40]
mov dword [esp + 0x1c], edi
jmp 0x40456d
mov eax, dword [0x4a14b8]
mov edi, eax
imul edi, edi, 0x70
inc eax
add edi, ecx
mov dword [esp + 0x1c], edi
mov dword [0x4a14b8], eax
cmp eax, dword [0x49d32c]
jl 0x4044ee
mov dword [0x4a14b8], 0
mov al, byte [ebp + 0x18]
mov cl, byte [ebp + 0x20]
mov byte [edi], al
mov byte [edi + 5], cl
call dword [0x48d2e4]
mov edx, eax
sub edx, dword [0x4a32fc]
mov dword [0x4a14bc], eax
mov dword [esp + 0x34], edx
fild dword [esp + 0x34]
jns 0x40451c
fadd dword [0x497be0]
fdiv qword [0x497bd8]
mov dword [0x4a32fc], eax
fstp dword [edi + 8]
call dword [0x48d604]
mov esi, eax
test esi, esi
je 0x40455d
cmp esi, dword [0x4a14c0]
je 0x404557
mov ecx, dword [0x4a0a38]
push esi
lea eax, [edi + 0xc]
push eax
push 0x418
push ecx
call dword [0x48d570]
jmp 0x404564
mov byte [edi + 0xc], 0
jmp 0x404564
mov dword [edi + 0xc], 0x412f4e
mov dl, byte [ebp + 0x18]
mov dword [0x4a14c0], esi
cmp dl, 0xe7
jne 0x40458a
mov edx, dword [ebp + 0x14]
mov ax, word [edx + 4]
mov word [edi + 2], ax
mov byte [edi + 4], 0x55
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [edx + 0x64]
mov word [edi + 2], bx
cmp cl, 3
ja 0x40459b
xor ebx, ebx
mov dword [ebp + 0x1c], ebx
mov eax, dword [ebp + 8]
cmp eax, dword [0x4a0b6c]
jne 0x4045cf
mov al, byte [ebp + 0x28]
and al, 1
mov byte [esp + 0xf], al
jne 0x4046ff
cmp byte [ebp + 0x20], 0
movzx edx, dl
setne cl
dec cl
and cl, 0x80
mov byte [edx + 0x4a0a58], cl
jmp 0x4046ff
mov eax, dword [ebp + 0x28]
shr eax, 4
and al, 1
mov byte [esp + 0xf], al
test ebx, 0x100
jne case.0x404611.13
push 0x90
call dword [0x48d5ec]
test al, 1
je case.0x404611.13
movzx eax, byte [ebp + 0x18]
add eax, 0xfffffff4
cmp eax, 0x62
ja case.0x404611.13
movzx ecx, byte [eax + 0x405f94]
jmp dword [ecx*4 + 0x405f64]
cmp byte [ebp + 0x20], 0
sete dl
mov byte [0x49f932], dl
jmp case.0x404611.13
movzx esi, byte [ebp + 0x18]
mov edx, dword [0x4a14d8]
lea ecx, [esi + esi*8]
shl ecx, 5
cmp byte [ecx + edx + 4], 0
jne 0x4046ff
test byte [ebp + 0x28], 0x10
jne 0x4046ff
mov eax, dword [ebp + 0x20]
push eax
mov al, byte [ebp + 0x18]
call fcn.004073a0
add esp, 4
test al, al
je 0x4046ff
cmp byte [ebp + 0x20], 0
setne cl
dec cl
and cl, 0x80
mov byte [esi + 0x4a0a58], cl
cmp byte [esp + 0xd], 0
je 0x40470a
mov al, 0x69
jmp 0x404716
mov al, byte [esp + 0xf]
neg al
sbb al, al
and al, 0x41
add al, 0x20
cmp byte [0x4a0b58], 0
mov byte [edi + 4], al
je 0x40475c
mov al, byte [ebp + 0x18]
cmp al, 0x5b
je 0x40472d
cmp al, 0x5c
jne 0x40475c
cmp byte [ebp + 0x20], 0
jne 0x40475c
mov edx, dword [ebp + 0x18]
push 0
push 0x7fffffff
push 0x3fff
push edi
push ebx
push edx
xor bl, bl
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x14]
call fcn.00406090
add esp, 0x18
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [0x49f951], 0
je 0x404800
cmp byte [ebp + 0x18], 0x1b
jne 0x404800
cmp byte [ebp + 0x20], 0
jne 0x404800
push 0
push str.32771_b__32
call dword [0x48d574]
test eax, eax
je 0x404800
push 0
push eax
call dword [0x48d600]
mov esi, eax
call dword [0x48d2b8]
cmp esi, eax
jne 0x404800
push 0xffc3d44d
push 0
push 0
push 0
push 0x1b
push 0
call fcn.0040e2a0
mov al, byte [0x4a0a35]
push 0xffc3d44d
shr al, 3
push 0
and al, 1
or al, 0xa4
push 0
movzx ecx, al
push 0
push ecx
push 1
call fcn.0040e2a0
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp + 8]
push 0
push 0x7fffffff
push 0x3fff
push edi
push ebx
push 0x1b
xor bl, bl
call fcn.00406090
add esp, 0x48
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
movzx eax, bx
lea edx, [eax + eax*8]
mov dword [esp + 0x30], eax
mov eax, dword [0x4a14dc]
shl edx, 5
mov cl, byte [eax + edx + 0x12]
add eax, edx
mov edx, dword [0x4a0b68]
mov byte [esp + 0x27], cl
cmp dword [ebp + 8], edx
jne 0x404832
test cl, cl
je 0x404832
mov cl, byte [ebp + 0x18]
mov esi, eax
jmp 0x404844
mov cl, byte [ebp + 0x18]
movzx eax, cl
lea esi, [eax + eax*8]
shl esi, 5
add esi, dword [0x4a14d8]
cmp byte [esp + 0xd], 0
mov dword [esp + 0x18], esi
je 0x404889
cmp dword [ebp + 0x24], 0xffc3d44e
jne 0x404878
cmp byte [ebp + 0x20], 0
je 0x404878
cmp dword [0x49f94c], esi
jne 0x404878
mov byte [esi + 0xc], 0
mov byte [esi + 0xf], 0
mov dword [0x49f94c], 0
mov ecx, dword [ebp + 0x20]
push 0
push 0x3fff
push edi
push ecx
jmp 0x405f3f
cmp byte [ebp + 0x20], 0
jne 0x40489c
mov eax, 0x3fff
mov byte [esi + 0x10], 0
mov word [esi + 6], ax
cmp dword [ebp + 8], edx
jne 0x404956
cmp byte [ebp + 0x20], 0
je 0x4049c5
cmp byte [0x49f955], 0
je 0x4048bd
cmp cl, 0x5b
je 0x4048ef
cmp byte [0x49f954], 0
je 0x4048cb
cmp cl, 0x5c
je 0x4048ef
cmp byte [0x49f953], 0
je 0x4048d9
cmp cl, 0xa4
je 0x4048ef
cmp byte [0x49f952], 0
je 0x4049c5
cmp cl, 0xa5
jne 0x4049c5
movzx eax, cl
add eax, 0xffffffa5
cmp eax, 0x4a
ja case.default.0x404901
movzx ecx, byte [eax + 0x40600c]
jmp dword [ecx*4 + 0x405ff8]
mov byte [0x49f955], 0
jmp case.default.0x404901
invalid
sbb esi, eax
add eax, 0x49f954
add bl, ch
adc dh, al
add eax, 0x49f953
add bl, ch
pop es
mov byte [0x49f952], 0
test byte [0x4a0a35], 3
jne 0x4049c5
movzx edx, byte [0x49d2f9]
push 0xffc3d44d
push 0
push 0
push 0
push edx
push 2
call fcn.0040e2a0
add esp, 0x18
jmp 0x4049c5
test cl, cl
jne 0x404988
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
push 0
push 0x3fff
push edi
push eax
mov eax, dword [ebp + 8]
push 0
push ecx
mov ecx, dword [ebp + 0x14]
push edx
push eax
mov eax, ebx
call fcn.00406180
add esp, 0x20
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp cl, 1
je 0x404992
cmp cl, 2
jne 0x4049c5
cmp dword [0x4a0bb0], 0
jne 0x405f27
push 0
push 0x491198
call dword [0x48d574]
test eax, eax
je 0x4049c5
push 0
push eax
call dword [0x48d600]
cmp eax, dword [0x4a2bbc]
je 0x405f27
mov ecx, dword [0x49f94c]
test ecx, ecx
je 0x4049fd
cmp ecx, esi
je 0x4049fd
mov dl, byte [ebp + 0x20]
test dl, dl
jne 0x404a00
mov eax, dword [ebp + 8]
cmp eax, dword [0x4a0b68]
jne 0x4049ef
xor eax, eax
cmp byte [esi + 4], al
sete al
jmp 0x4049f3
movzx eax, byte [ecx + 4]
test eax, eax
je 0x404a00
mov byte [ecx + 0x11], 1
jmp 0x404a00
mov dl, byte [ebp + 0x20]
cmp byte [esi + 8], 0
jne 0x404a10
cmp byte [esi + 9], 0
je 0x404878
mov byte [esp + 0x2b], 0
mov dword [esp + 0x10], 0x3fff
mov dword [esp + 0x3c], 0
test dl, dl
je 0x404a58
mov al, byte [esi + 0xc]
mov cl, byte [esi + 0xf]
mov byte [esp + 0x17], al
movzx eax, word [esi + 6]
mov byte [esp + 0x15], cl
mov ecx, 0x3fff
mov byte [esi + 0xf], 0
cmp ax, cx
je 0x404a56
mov dword [esp + 0x10], eax
mov byte [esp + 0x2b], 1
mov word [esi + 6], cx
test dl, dl
sete al
mov byte [esi + 0xc], al
mov eax, dword [0x4a0b68]
mov byte [esp + 0xd], 0
cmp dword [ebp + 8], eax
jne 0x404ae8
cmp byte [esi + 4], 0
je 0x404b08
mov ecx, dword [0x4a14d8]
cmp byte [ecx + 0xb64c], 0
jne 0x404a93
cmp byte [ecx + 0xb76c], 0
jne 0x404a93
xor eax, eax
jmp 0x404a98
mov eax, 1
cmp byte [ecx + 0xb88c], 0
mov byte [ecx + 0x132c], al
jne 0x404ab4
cmp byte [ecx + 0xb9ac], 0
jne 0x404ab4
xor eax, eax
jmp 0x404ab9
mov eax, 1
cmp byte [ecx + 0xb40c], 0
mov byte [ecx + 0x144c], al
jne 0x404adb
cmp byte [ecx + 0xb52c], 0
jne 0x404adb
xor eax, eax
mov byte [ecx + 0x120c], al
jmp 0x404b0e
mov eax, 1
mov byte [ecx + 0x120c], al
jmp 0x404b0e
test eax, eax
jne 0x404b08
push 1
call fcn.00410850
mov dl, byte [ebp + 0x20]
add esp, 4
mov byte [0x4a0a36], al
mov byte [0x4a0a35], al
mov byte [esp + 0xd], 1
mov ecx, dword [0x4a14d8]
mov eax, dword [esi]
test eax, eax
je 0x404b1e
cmp dword [eax], 7
mov byte [esp + 0xf], 1
je 0x404b23
mov byte [esp + 0xf], 0
mov al, byte [esi + 8]
test al, al
je 0x404cc1
test dl, dl
jne 0x404cc1
mov edx, dword [0x49f94c]
test edx, edx
je 0x404b4e
cmp byte [esi + 9], 0
je 0x404b4e
cmp esi, edx
jne 0x404cc1
cmp al, 1
jne 0x404b7a
cmp byte [esp + 0x27], 0
mov eax, dword [esp + 0x30]
jne 0x404b61
movzx eax, byte [ebp + 0x18]
mov ecx, dword [esp + 0x27]
push ecx
push eax
call fcn.00409590
add esp, 8
test al, al
je 0x404b7a
mov byte [esp + 0xe], 1
jmp 0x404b91
mov byte [esp + 0xe], 0
cmp esi, dword [0x49f94c]
je 0x404b91
mov dword [0x49f94c], esi
mov byte [esi + 0x11], 0
cmp byte [esi + 9], 0
je 0x404c41
cmp byte [esp + 0xd], 0
jne 0x404bb1
push 1
mov byte [esp + 0x11], 1
call fcn.00410850
add esp, 4
mov al, byte [esi + 4]
mov cl, byte [0x4a0a36]
test al, al
je 0x404bc2
not al
and cl, al
test cl, cl
jne 0x404bcc
cmp byte [esp + 0xe], cl
je 0x404c41
mov edx, dword [ebp + 8]
cmp edx, dword [0x4a0b68]
jne 0x404bf4
cmp byte [esp + 0x27], 0
je 0x404bf4
movzx eax, cl
mov ecx, dword [0x4a14d0]
shl eax, 8
add eax, dword [esp + 0x30]
movzx ecx, word [ecx + eax*2]
jmp 0x404c0a
movzx eax, byte [ebp + 0x18]
movzx edx, cl
mov ecx, dword [0x4a14cc]
shl edx, 8
add edx, esp
movzx ecx, word [eax]
push ecx
mov dword [esp + 0x14], ecx
out 0xc1, eax
add byte [eax], al
add ah, byte [esi + eax]
mov word [esi + 6], cx
jmp 0x404c4f
cmp eax, dword [edx]
jae 0x404c45
retf
mov ecx, dword [esp + 0x10]
mov edx, 0x3fff
cmp bx, dx
jne 0x404cbb
mov al, byte [eax - 0x5c]
push cs
test al, al
je 0x404c5f
or byte [esi + 0xb], 8
les eax, [edi + 4]
and eax, dword [eax + 0x7500047f]
sub esi, esi
inc esi
or esp, dword [ecx]
cmp byte [edi + 4], 0
jne 0x404c8e
test byte [esi + 0xb], 0x21
jne 0x404c8b
cmp byte [esp - 0x71], 0
jne 0x404c8d
dec esp
sal byte [ebp + 0x17], 0x8a
inc ebp
sbb byte [edx], ch
push 0x7fffffff
push 0x3fff
push edi
push ebx
push eax
jmp 0xf83b473d
invalid
cli
imul dword [edx]
push 0
add byte [eax - 1], ch
aas
add byte [eax], al
push 0x3fff
push edi
push 0
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp - 0x70]
mov eax, dword [ebp + 0xc]
push ecx
mov ecx, dword [ebp + 8]
pop edx
push eax
push ecx
invalid
mov ecx, dword [0x4a04d8]
cmp byte [esi + 9], 0
mov byte [esp + 0x16], 0x20
je 0x404d35
cmp byte [eax], 0x74
arpl word [ebx], di
xor eax, 0x49f94c
jne 0x404cea
cmp byte [esp + 0x15], 0
je 0x404d35
mov dword [0x49f94c], 0x100
cmp byte [esi + 0xa], 8
jne 0x404d70
add byte [eax + 0x75080a7e], al
jg 0x404c7c
mov al, byte [esi + 0xb]
test al, 8
jl 0x404d01
inc esi
or ebp, dword [eax + 0x32097c08]
leave
xor cl, cl
and al, 0xf7
mov byte [edi + 0xb], al
jmp 0x404d23
mov cl, 1
cmp byte [esp + 0x15], 0
je 0x494e38
test cl, cl
je 0x4604e38
mov ebx, dword [edi + 0x18]
push 4
push 0x7fffffdf
push 0x3fef
add byte [eax], al
push edi
push ebx
mov bl, byte [ebp + 0x20]
push edx
jmp 0x404747
cmp byte [esi], 4
pop es
test ch, ah
add dword [eax], eax
add byte [eax - 0x70ffde83], al
test bl, bl
add dword [eax], eax
add byte [ecx], bh
jne 0x404db8
stc
dec ecx
add byte [ebp + 0xa], dh
mov dword [0x49f9dc], 0x800000
cmp byte [esi + 0xd], 4
hlt
mov byte [esi + 0xd], 0
call 0x40d2a0
mov ecx, dword [0x4a14d8]
or esp, 0x18
cmp byte [esi + 0xe], 0
je 0x404da9
push 0xffc3d04d
push 0
outsb dx, byte [esi]
add byte [edx], ch
push 0x10
push 1
mov byte [esi + 0xe], 0
call fcn.0040e2a0
mov ecx, dword [0x4b14d8]
adc esp, 0x18
mov edx, dword [esp + 0x10]
mov al, 0xff
cmp eax, 0x3b668040
sal byte [ebp + 0x1d], 1
adc byte [eax - 0x7fbfc201], dh
cmp dx, ax
jne 0x404dd4
mov al, byte [esi + 0xb]
test al, 0x48
je 0x404dd4
inc esi
or ebp, dword [eax - 0x74e98bb8]
dec ebp
and byte [edx + 2], ch
mov ecx, dword [ebp + 0x20]
push 2
push 0x3fff
and al, 0xf7
push edi
mov byte [esi + 0xb], al
push ebx
jmp 0x405f4f
nop
jl 0x404dfb
lar ecx, word [edx + 0x6b741146]
cmp al, 2
jne 0x404e30
mov esi, dword [ebp + 0x18]
js 0x404e35
je 0x404dac
mov edi, 0x6a806a
push ebx
push esi
push 1
call fcn.004062a0
call 0x42249
dec edx
add byte [edx + 0x40], ch
dec dword [edx]
push 0x40
rcl dword [esi + 0x6a], cl
inc edx
call fcn.0040e2a0
mov ecx, dword [0x845cb14]
push 0
js 0x404e12
invalid
out dx, eax
invalid
cmp al, 0
jne 0x404ec7
add byte [eax], al
add byte [edx], ch
push 0
mov edx, ebp
and byte [eax], ch
invalid
mov al, byte [0x7500097e]
cmp dword [eax + 0xf00047e], eax
test dword [ecx - 0x9008007], esp
inc esi
or eax, dword [ecx]
jne 0x3f4878
cmp byte [esp + 0xf], 0
jne 0xe0384878
mov eax, dword [ebp + 0x18]
push 0
pushal
invalid
retf
wait
push ebp
sbb byte [ebx + 0x4d8a1065], cl
or al, 0x52
mov edx, dword [ebp + 8]
push eax
push ecx
mov ecx, dword [ebp + 0x14]
push edx
dec ebp
adc al, 0x52
mov eax, dword [ebx + 0x8227e8]
add bl, al
lds esp, [eax]
pop edi
pop esi
pop ebx
mov esp, ebp
ffree st(3)
nop
jbe 0x405fac
inc eax
add byte [ecx + 0x59004016], dh
inc esi
inc ecx
invalid