Function at 0x403edd
Capabilities:
Encrypt data using speck
Get common file path
Read pipe
Write pipe

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push ebx
push esi
movzx esi, word [ebp + 0x10]
mov eax, esi
xor edx, edx
mov ecx, 0x126
push edi
div ecx
xor edx, edx
add ecx, 0x15
mov dword [ebp - 0x14], esi
div dword [ebp + 0xc]
xor edx, edx
div ecx
lea eax, [esi - 0x3e1]
mov ebx, edx
xor ebx, eax
mov eax, 0x44013b
mov dword [ebp - 0xc], eax
cmp ebx, 0xffffff8b
jne 0x403f47
mov eax, dword [ebp + 8]
xor edx, edx
mov ecx, 0xe9
div ecx
mov ecx, esi
mov eax, dword [ebp + 0xc]
imul ecx, ecx, 0xffffffe6
or ecx, ebx
sub eax, edx
sub eax, 0xae
and eax, ecx
mov ecx, dword [ebp - 0xc]
lea eax, [ecx + eax - 0xabec]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 8]
xor edx, edx
div eax
mov edi, dword [ebp - 0xc]
mov dword [ebp - 0x1c], edi
sub al, 0x4d
and al, byte [ebp + 8]
cmp dword [ebp + 8], 0x10
mov byte [ebp - 1], al
jbe 0x403f7e
cmp dword [ebp + 8], 0x67cd
jne 0x403f7e
mov eax, dword [ebp + 0xc]
xor edx, edx
div eax
mov eax, edi
shl edx, 2
sub eax, edx
mov edi, dword [eax]
mov dword [ebp - 0x1c], edi
mov eax, ebx
xor edx, edx
div dword [ebp + 8]
mov eax, dword [ebp + 0xc]
lea ecx, [ebx + 0x72]
sub eax, edx
xor eax, ecx
cmp ebx, 0xffffff8b
mov dword [ebp - 8], eax
jne 0x403fb2
lea eax, [edi + 0x12f5]
mov dword [ebp - 0x54], eax
mov al, byte [ebp - 1]
cmp al, 0x58
mov dword [ebp - 0x50], edi
jne 0x403fc5
push 0x58
pop eax
jmp 0x40497a
cmp ebx, 0x53
jae 0x403fa0
mov eax, ebx
xor edx, edx
div dword [ebp + 0xc]
or al, 0x6a
mov byte [ebp - 1], al
jmp 0x403fa3
cmp al, 0x29
jne 0x403fee
push 0x26
xor edx, edx
pop eax
mov ecx, dword [ebp + 0xc]
div dword [ebp + 8]
mov eax, 0x32d
xor ecx, 0xc1
sub eax, edx
or eax, ecx
mov dword [ebp - 8], eax
mov al, byte [ebp - 1]
jmp 0x404085
cmp al, 0x5b
jb 0x404700
cmp al, 0x84
jne 0x404057
mov ecx, dword [ebp + 8]
cmp ecx, 0x43
jne 0x404006
xor al, al
jmp 0x404085
cmp ecx, 0x24
jae 0x404016
lea ecx, [esi + 0x161]
mov dword [ebp - 8], ecx
jmp 0x404085
cmp ecx, 8
jne 0x404025
mov ebx, dword [ebp + 0xc]
xor ebx, 0x20
or ebx, esi
jmp 0x404085
cmp ecx, 0x67cd
jne 0x404036
mov dword [ebp - 0x30], 0x22d40
jmp 0x404085
cmp ecx, 0x31
jae 0x404045
mov eax, 0x84
jmp 0x40497a
cmp ecx, 0x10
jae 0x404085
xor ebx, dword [ebp + 0xc]
or ebx, dword [ebp - 8]
or bx, 0x308
jmp 0x404085
cmp al, 0x52
jae 0x40407d
mov ecx, dword [ebp - 8]
movzx ebx, al
sub ebx, dword [ebp + 8]
add ecx, 0x1a3
and ecx, dword [ebp + 8]
add ebx, 0xc1
and ecx, 0x230
or ebx, ecx
jmp 0x404085
cmp al, 0x14
jb 0x404977
mov ecx, dword [ebp + 0xc]
cmp ecx, 0x1b
jb 0x404708
cmp ecx, 6
mov edi, 0x1d0
ja 0x404135
mov eax, dword [ebp + 8]
xor edx, edx
div esi
mov eax, dword [ebp + 8]
imul eax, eax, 0x132
or edx, eax
or dx, 0x3c4
or dword [ebp - 8], edx
mov eax, dword [ebp + 0xc]
xor edx, edx
mov ecx, 0x23a
div ecx
mov ecx, dword [ebp - 0xc]
imul byte [ebp + 0xc]
movzx eax, al
xor eax, dword [ebp + 0xc]
xor eax, 1
lea esi, [ecx + eax - 0xa55d]
mov cl, 0x62
sub cl, byte [ebp - 8]
mov dword [ebp - 0xc], esi
sub cl, bl
cmp word [ebp + 0x10], 0x36c
mov byte [ebp - 1], cl
jne 0x404176
mov eax, 0x17d
xor edx, edx
div dword [ebp - 8]
mov eax, dword [ebp + 0xc]
imul eax, eax, 0x2b4
movzx ecx, cl
add edx, eax
or edx, ebx
or edx, dword [ebp + 8]
mov eax, dword [esi + edx*4 + 0x84]
xor edx, edx
mov dword [ebp - 0x4c], eax
mov eax, 0x4b0
div ebx
xor eax, ecx
mov cl, byte [ebp - 1]
mov eax, dword [esi + eax*4 - 0x210]
mov dword [ebp - 0x48], eax
jmp 0x404181
cmp ecx, 0x19
jne 0x404150
mov eax, edi
sub eax, ebx
and eax, esi
or eax, dword [ebp + 8]
push eax
push eax
call dword [sym.imp.USER32.dll_RemovePropA]
jmp 0x4040b9
cmp ecx, 0xb48e
jne 0x404165
mov eax, 0x43d262
mov dword [ebp - 0xc], eax
jmp 0x4040b9
cmp ecx, 0x44
jae 0x4040b9
movzx eax, al
jmp 0x40497a
cmp word [ebp + 0x10], 0x26
jb 0x404977
movzx ebx, cl
mov eax, 0x180
xor edx, edx
div ebx
mov ebx, dword [ebp + 0xc]
or edx, ebx
cmp cl, 0x42
mov dword [ebp - 0x10], edx
jne 0x4041ba
mov eax, ebx
xor edx, edx
mov ecx, 0xb3
div ecx
mov ecx, 0x15c
mov eax, edx
xor edx, edx
div ecx
mov cl, 0x48
mov al, dl
imul cl
mov cl, al
jmp 0x404230
cmp cl, 0x21
je 0x404230
cmp cl, 0x45
jae 0x4041d8
mov al, byte [ebp - 8]
mov cl, 7
imul cl
mov cl, 0xb1
sub cl, al
mov al, byte [ebp + 8]
xor al, bl
or cl, al
jmp 0x404230
cmp cl, 0x5b
jbe 0x404230
cmp cl, 0x85
jne 0x4041f8
mov eax, dword [ebp + 8]
add eax, 0x86
or al, 0xb9
mov eax, dword [esi + eax*4 - 0x1a3e4]
mov dword [ebp - 0x3c], eax
jmp 0x404230
cmp cl, 0x41
jae 0x404230
mov eax, 0x261
xor edx, edx
div dword [ebp + 0xc]
xor edx, edx
mov ebx, 0x363
mov ecx, eax
mov eax, dword [ebp - 8]
imul ecx, eax
div ebx
imul edx, edx, 0xdb
or ecx, edx
push ecx
push ecx
push ecx
push ecx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov cl, byte [ebp - 1]
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
imul eax, eax, 0x4e
sub eax, dword [ebp - 0x14]
add eax, edi
cmp word [ebp + 0x10], 0x2f
mov dword [ebp - 8], eax
je 0x40426c
cmp word [ebp + 0x10], 0x36c
jne 0x40426c
movzx eax, cl
xor edx, edx
div dword [ebp + 8]
mov eax, 0x17b
sub eax, dword [ebp + 8]
sub edx, dword [ebp - 0x10]
and edx, eax
mov eax, dword [esi + edx*4 + 0x3d9f4]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x30]
cmp eax, 8
mov dword [ebp - 0x2c], eax
jle 0x4046c0
mov ecx, dword [ebp + 8]
lea eax, [ebx + 0xe36d4]
xor ecx, 0x2f5
or eax, ecx
mov dword [ebp - 0x38], eax
lea eax, [ebx + 0x190]
xor eax, 0x126
or eax, dword [ebp + 0x10]
or al, 0x81
mov dword [ebp - 0x34], eax
mov esi, dword [ebp - 0x34]
cmp ebx, 0x26
jbe 0x404350
cmp ebx, 0x1c
jb 0x404350
cmp ebx, 0xb48e
jne 0x404307
cmp si, 0xb7fd
jne 0x4042fb
cmp dword [ebp + 8], 0x1a
jae 0x4042e9
mov ecx, dword [ebp - 0x14]
lea eax, [ecx - 0x2fe20]
add ecx, 0xfffd01e0
push eax
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetupComm]
mov ebx, dword [ebp + 0xc]
jmp 0x404350
cmp dword [ebp + 8], 0x67cd
jne 0x404350
mov dword [ebp - 0x20], 0xc6ef3720
jmp 0x404350
cmp si, 0x21
jb 0x404977
jmp 0x404350
cmp ebx, 0x39
jae 0x404318
mov eax, 0x248
xor edx, edx
div dword [ebp + 8]
jmp 0x40434e
cmp ebx, 0x1e
jne 0x40432a
movzx eax, si
push eax
push eax
call dword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
jmp 0x4042e4
cmp ebx, 0x1c
jne 0x404350
mov eax, 0x1c5
xor edx, edx
div dword [ebp - 0x38]
mov ecx, dword [ebp + 8]
mov eax, 0xfffa
imul ecx, esi
and ecx, 0x2e7
sub eax, edx
xor eax, ecx
mov esi, eax
mov eax, ebx
and eax, 0x204
or ax, 0x1fa
cmp dword [ebp + 8], 0x67cd
jne 0x4043c7
cmp eax, 0x5b
jbe 0x4043d7
mov ecx, 0x1fe
cmp eax, ecx
jne 0x4043d7
cmp si, 0x52
jb 0x4046f2
cmp si, 2
jb 0x4043d7
cmp si, 0x51
ja 0x404399
push dword [ebp - 0x14]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov ebx, dword [ebp + 0xc]
jmp 0x4043d7
cmp si, 0xb7fd
jne 0x4043b3
mov ecx, dword [ebp - 0x1c]
mov eax, ebx
or al, 0x48
mov eax, dword [ecx + eax*4 - 0x2d338]
mov dword [ebp - 0x18], eax
jmp 0x4043d7
cmp si, 6
jb 0x4043d7
cmp si, 0x33
jae 0x4043d7
push dword [ebp + 0xc]
push dword [ebp + 0xc]
jmp 0x40438e
cmp dword [ebp + 8], 0x19
jbe 0x4043d7
cmp dword [ebp + 8], 0x44
jb 0x4046f9
lea eax, [ebx + ebx]
mov ecx, eax
mov eax, dword [ebp + 8]
sub eax, ecx
sub eax, 0x24b
cmp ax, 0xfc66
jne 0x4043fc
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x14]
mov eax, dword [eax + ecx*4 - 0xdac]
mov dword [ebp - 0x24], eax
mov eax, 0xe1
xor edx, edx
div ebx
and dword [ebp - 0x28], 0
mov edi, 0x552
sub edi, edx
sub edi, ebx
mov dword [ebp - 0x44], edi
movzx eax, di
xor edx, edx
div eax
mov esi, eax
or esi, dword [ebp + 8]
or si, 0x2b6
lea ebx, [esi + esi + 0x2a2]
or bx, 0x298
cmp word [ebp + 0x10], 0x2b
jae 0x404453
push 0xb
xor edx, edx
pop eax
mov ebx, 0x3cb
div esi
mov eax, dword [ebp + 8]
xor eax, 0x387
sub ebx, edx
or ebx, eax
jmp 0x4044bb
cmp word [ebp + 0x10], 0x36c
jne 0x4044b1
mov eax, 0x14d
xor edx, edx
div esi
xor edx, edx
mov ecx, 0x10b
mov edi, dword [ebp - 0x18]
div ecx
xor edx, edx
lea ecx, [eax + esi - 0x67fb]
mov eax, 0xa2
div dword [ebp + 0xc]
shl edi, cl
mov ecx, 0x8b
add edi, dword [ebp - 0x3c]
mov eax, edx
xor edx, edx
div ecx
mov eax, dword [ebp - 0x18]
mov ecx, edx
mov edx, eax
sub ecx, 0x12
shr edx, cl
mov ecx, dword [ebp - 0x20]
add eax, ecx
add edx, dword [ebp - 0x40]
xor edi, edx
xor edi, eax
sub dword [ebp - 0x24], edi
mov edi, dword [ebp - 0x44]
jmp 0x4044bb
cmp word [ebp + 0x10], 2
jne 0x4044bb
mov ebx, dword [ebp + 8]
movzx ecx, bx
mov eax, esi
xor edx, edx
div ecx
xor edx, edx
mov ecx, 0x1ab
div ecx
mov ebx, eax
cmp bx, 0x4f
jbe 0x4044e6
push dword [ebp + 8]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
jmp 0x4045d9
cmp bx, 0x11
jae 0x404700
test bx, bx
jne 0x4045c8
cmp esi, 0x67ff
jne 0x40457d
cmp dword [ebp + 8], 0x67cd
jne 0x4045d9
cmp word [ebp + 0x10], 0x36c
jne 0x40455a
mov eax, 0x269
xor edx, edx
div dword [ebp + 0xc]
mov ecx, eax
mov eax, 0x2aa
dec ecx
sub eax, dword [ebp + 0xc]
imul ecx, dword [ebp + 0xc]
and ecx, eax
mov eax, dword [ebp - 0x24]
add ecx, 0xb5f5
mov edx, eax
shr edx, cl
mov ecx, eax
shl ecx, 4
add ecx, dword [ebp - 0x4c]
add edx, dword [ebp - 0x48]
xor edx, ecx
mov ecx, dword [ebp - 0x20]
add eax, ecx
xor edx, eax
sub dword [ebp - 0x18], edx
jmp 0x4045f0
cmp word [ebp + 0x10], 0x32
jne 0x4045d9
push 0x6c
xor edx, edx
pop eax
div dword [ebp + 0xc]
xor eax, 0x61
or ax, 0x28e
push eax
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
jmp 0x40463d
cmp esi, 0x39
jae 0x404599
mov eax, 0x1ea
xor edx, edx
div esi
xor edx, edx
div esi
mov ebx, edx
xor ebx, dword [ebp + 0x10]
or ebx, dword [ebp + 8]
jmp 0x4045d9
cmp esi, 0x15
jne 0x4045b4
mov eax, dword [ebp + 8]
xor edx, edx
mov ecx, 0x332
div ecx
mov esi, eax
and esi, 0x353
jmp 0x4045d9
cmp esi, 0x14
je 0x40496a
cmp esi, 0x10
je 0x404700
jmp 0x4045d9
cmp bx, 0x61
jbe 0x4045d9
movzx eax, bx
imul eax, eax, 0x19d
xor esi, eax
cmp word [ebp + 0x10], 0x36c
jne 0x40462f
cmp dword [ebp + 8], 0x5b
jbe 0x40463d
cmp dword [ebp + 8], 0x67cd
jne 0x404613
movzx eax, bx
and esi, 0xfed3
xor esi, eax
mov eax, 0x61c879b1
add esi, 0x2ef
xor esi, 0xffff9aa8
sub eax, esi
add dword [ebp - 0x20], eax
jmp 0x40463d
cmp dword [ebp + 8], 0x24
jbe 0x40463d
cmp dword [ebp + 8], 0x1f
jb 0x404700
cmp dword [ebp + 8], 0x20
jb 0x404708
jmp 0x40463d
cmp word [ebp + 0x10], 0x13
jae 0x40463d
push esi
call dword [sym.imp.KERNEL32.dll_InitAtomTable]
inc dword [ebp - 0x28]
cmp dword [ebp - 0x28], 0x20
jl 0x404415
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
or ax, 0x2ab
mov esi, 0x9c
mov dword [ecx + eax*4 - 0x2dabc], edx
mov eax, dword [ebp + 0xc]
xor edx, edx
div esi
xor edx, edx
mov esi, 0x365
div esi
and eax, 0x2e7
cmp ax, 0x4c
ja 0x4046a1
test ax, ax
jne 0x4046a1
cmp dword [ebp + 0xc], 0xb48e
jne 0x4046a1
cmp dword [ebp + 8], 0x39
jb 0x40470f
cmp dword [ebp + 8], 0x67cd
jne 0x4046a1
mov eax, dword [ebp - 0x24]
mov dword [ecx + 4], eax
cmp word [ebp + 0x10], 0x36c
jne 0x4046af
add ecx, 8
mov dword [ebp - 0x1c], ecx
sub dword [ebp - 0x2c], 8
mov ebx, dword [ebp + 0xc]
cmp dword [ebp - 0x2c], 8
jg 0x4042a2
mov eax, 0x417e3c
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 8]
xor edx, edx
div ebx
xor edx, edx
imul eax, eax, 0x5a
div ebx
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x10]
cmp eax, 0xf
jae 0x404716
lea eax, [ebx + 1]
imul eax, dword [ebp - 8]
sub eax, 0x3a2
mov dword [ebp - 0x10], eax
jmp 0x404741
mov eax, ecx
jmp 0x40497a
mov eax, ebx
jmp 0x40497a
mov eax, dword [ebp + 0xc]
jmp 0x40497a
mov eax, esi
jmp 0x40497a
xor eax, eax
jmp 0x40497a
cmp eax, 0xb4fe
jne 0x404738
mov eax, dword [ebp - 8]
xor edx, edx
mov ecx, 0x12b
div ecx
mov eax, dword [ebp - 0xc]
lea eax, [eax + edx + 0x2228]
mov dword [ebp - 0xc], eax
jmp 0x404741
cmp eax, 0x3e
jbe 0x40497a
mov bl, byte [ebp + 0x10]
mov eax, dword [ebp - 8]
sub bl, 0x3f
test eax, eax
jne 0x404758
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
mov dword [ebp - 0x30], eax
jmp 0x4047d1
cmp eax, 0x27
jb 0x404772
mov eax, dword [ebp - 0x14]
add eax, 0x8b
and eax, 0x3e4
xor eax, dword [ebp - 0x10]
mov dword [ebp - 8], eax
jmp 0x4047d1
cmp eax, 0x24
ja 0x40497a
cmp eax, 0x54
jne 0x404794
mov al, bl
sub eax, dword [ebp - 0x10]
and eax, dword [ebp - 0x14]
and eax, 0x89
xor eax, 0x2f2
jmp 0x4047ce
cmp eax, 0x29
jne 0x4047b8
mov ecx, dword [ebp + 8]
mov al, bl
and eax, 0xd
add ecx, 0x262
or eax, ecx
push eax
push eax
push eax
push eax
push eax
push eax
push eax
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
jmp 0x4047d1
cmp eax, 0x5c
jne 0x4047d1
mov eax, dword [ebp - 0x10]
xor edx, edx
mov ecx, 0x183
div ecx
and eax, 0x2c1
mov dword [ebp - 0x10], eax
mov esi, dword [sym.imp.KERNEL32.dll_GlobalUnfix]
mov edi, 0xb48e
cmp dword [ebp + 0xc], edi
jne 0x40481f
cmp word [ebp + 0x10], 0x36c
jne 0x4047f3
mov eax, 0x417cd0
mov dword [ebp - 0xc], eax
jmp 0x40482e
cmp word [ebp + 0x10], 0x43
jae 0x40480e
movzx eax, bl
sub eax, dword [ebp + 8]
add eax, 0x342
or ax, 0x25e
push eax
call esi
jmp 0x40482e
cmp word [ebp + 0x10], 0x27
jae 0x40482e
mov al, 0x1e
sub al, bl
and al, 0xe2
mov bl, al
jmp 0x40482e
cmp dword [ebp + 0xc], 0x60
jae 0x40482e
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_HeapLock]
mov eax, 0x36e
xor edx, edx
div dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
and ecx, 0x357
imul eax, eax, 0x20f
xor eax, ecx
or dword [ebp - 8], eax
cmp dword [ebp + 0xc], edi
jne 0x4048e1
cmp dword [ebp + 8], 0x67cd
jne 0x4048d5
cmp bl, 0x2d
jne 0x40486f
add dword [ebp - 0xc], 0x238c
jmp 0x4048ef
cmp bl, 4
jae 0x404892
mov eax, dword [ebp - 8]
imul eax, eax, 0xb48e
movzx ecx, bl
add eax, 0x174
add ecx, 0x101
and eax, ecx
mov dword [ebp - 0x10], eax
jmp 0x4048e1
cmp bl, 0x34
jbe 0x4048a8
mov al, byte [ebp - 0x10]
mov bl, 0xf
sub bl, byte [ebp - 8]
sub al, 0x7f
and bl, al
and bl, 0x8e
jmp 0x4048e1
cmp bl, 0x54
jbe 0x4048b5
mov eax, dword [ebp - 8]
jmp 0x40497a
cmp bl, 0x58
jbe 0x4048c9
push edi
push edi
push edi
push edi
push edi
push edi
push edi
call dword [sym.imp.KERNEL32.dll_TransactNamedPipe]
jmp 0x4048e1
cmp bl, 0x45
jne 0x4048e1
push dword [ebp - 0x14]
call esi
jmp 0x4048e1
push 0x5e
pop eax
cmp dword [ebp + 8], eax
je 0x40497a
cmp bl, 0x5f
je 0x404977
cmp bl, 0x2d
jne 0x404965
mov eax, dword [ebp + 0xc]
push 0x2d
xor edx, edx
pop ecx
div ecx
mov ecx, dword [ebp - 0x10]
xor edx, edx
mov esi, 0xb0
add eax, ecx
add eax, dword [ebp + 8]
or ax, 0x242
div esi
mov eax, dword [ebp + 0xc]
imul eax, eax
imul eax, eax, 0x1b7
sub edx, eax
mov eax, dword [ebp + 8]
add edx, ecx
and edx, 0x3bf
add edx, 0x227b0
push edx
xor edx, edx
div ecx
push 0x4a
xor edx, edx
mov esi, eax
mov eax, ecx
pop ecx
div ecx
mov ecx, dword [ebp - 0xc]
add esi, edx
xor edx, edx
or esi, 0x20
add esi, 0x22cb6
push esi
push dword [ebp - 0x50]
push 0x28
pop eax
div dword [ebp - 8]
and eax, dword [ebp + 8]
push dword [ecx + eax*4]
push dword [ebp - 0x30]
call dword [ebp - 0x54]
jmp 0x404977
cmp bl, 0x4c
jbe 0x40496f
mov eax, dword [ebp - 0x14]
jmp 0x40497a
cmp bl, 0x4e
movzx eax, bl
jae 0x40497a
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
leave
ret