Function at 0x40e99b
Capabilities:
Access peb ldr_data
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x70
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov edx, dword [esp + 0x60]
mov esi, dword [esp + 0x64]
mov word [esp + 0x5c], 0x5b1e
mov dword [esp + 0x54], eax
mov edi, dword fs:[0x18]
xor eax, eax
mov dword [esp + 0x58], edi
mov bx, word [esp + 0x6a]
mov dword [esp + 0x50], esi
mov si, bx
or si, 0xfbf5
mov dword [esp + 0x4c], eax
mov eax, dword [edi + 0x30]
mov word [esp + 0x6a], si
mov eax, dword [eax + 0xc]
mov esi, eax
add esi, 0x14
mov dword [esp + 0x58], 0x463de736
mov dword [esp + 0x48], eax
mov al, byte [esp + 0x5f]
mov ah, al
xor ah, ah
mov dword [esp + 0x44], ecx
mov ecx, dword [esp + 0x48]
mov ecx, dword [ecx + 0x14]
mov byte [esp + 0x5f], ah
cmp ecx, esi
mov dword [esp + 0x40], ecx
mov ecx, dword [esp + 0x4c]
mov word [esp + 0x3e], bx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x34], edx
mov dword [esp + 0x30], edi
mov byte [esp + 0x2f], al
mov dword [esp + 0x28], esi
je 0x40ebd9
jmp 0x40eb04
mov eax, dword [esp + 0x24]
mov dx, word [esp + 0x3e]
mov cx, dx
add ecx, 0xffffd60b
mov si, cx
mov di, word [esp + 0x5c]
mov word [esp + 0x6a], si
mov ecx, dword [esp + 0x20]
movzx ebx, word [ecx + eax*2]
mov si, bx
add ebx, 0xffffffbf
mov dx, bx
mov ebx, dword [esp + 0x34]
not ebx
mov ecx, dword [esp + 0x50]
not ecx
mov word [esp + 0x1e], dx
mov dx, 0x5b3e
sub dx, di
mov dword [esp + 0x64], ecx
mov dword [esp + 0x60], ebx
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x58], ecx
mov ebx, eax
add ebx, 1
mov ecx, dword [esp + 0x18]
cmp ebx, ecx
setb cl
mov edi, dword [esp + 0x44]
mov di, word [edi + eax*2]
mov ax, si
add ax, dx
mov dx, word [esp + 0x1e]
cmp dx, 0x1a
cmovb si, ax
cmp di, si
sete ch
cmp si, 0
setne al
mov ah, byte [esp + 0x2f]
xor ah, 0xff
mov dl, ch
and dl, al
mov byte [esp + 0x5f], ah
mov si, word [esp + 0x3e]
sub si, 0x8c48
and dl, cl
mov word [esp + 0x6a], si
test dl, 1
mov byte [esp + 0x17], ch
mov dword [esp + 0x24], ebx
jne 0x40ea43
jmp 0x40eb1c
mov eax, dword [esp + 0x54]
cmp eax, 0
setne cl
mov edx, dword [esp + 0x40]
mov byte [esp + 0x16], cl
mov dword [esp + 0x10], edx
jmp 0x40eb32
mov al, byte [esp + 0x17]
test al, 1
mov ecx, dword [esp + 0xc]
mov dword [esp + 0x38], ecx
jne 0x40ebd9
jmp 0x40eb88
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 0x10]
mov dx, word [esp + 0x3e]
xor dx, 0x94c6
mov esi, dword [eax + 0x28]
mov word [esp + 0x6a], dx
mov edi, dword [esp + 0x54]
cmp ecx, edi
sete bl
mov bh, byte [esp + 0x16]
and bh, bl
test bh, 1
mov dword [esp + 8], eax
mov dword [esp + 0xc], ecx
mov dword [esp + 0x20], esi
jne 0x40eb7b
jmp 0x40ebf0
xor eax, eax
mov dword [esp + 0x24], eax
jmp 0x40ea43
mov eax, dword [esp + 8]
add eax, 0xfffffff8
mov dword [esp + 0x38], eax
jmp 0x40ebd9
xor eax, eax
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x50]
imul ecx, edx
mov esi, dword [esp + 0x34]
mov dword [esp + 4], eax
mov eax, esi
mul esi
add edx, ecx
add edx, ecx
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], edx
mov eax, dword [esp + 8]
mov ecx, dword [eax]
mov edx, dword [esp + 0x30]
and edx, 0x78b4a76b
mov dword [esp + 0x58], edx
mov edx, dword [esp + 0x28]
cmp ecx, edx
mov edi, dword [esp + 4]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x38], edi
jne 0x40eb32
mov eax, dword [esp + 0x38]
mov cl, byte [esp + 0x2f]
or cl, 0x19
mov byte [esp + 0x5f], cl
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov al, 0xf5
mov cx, 0x89e0
mov dword [esp + 0x58], 0xdcf8f6a1
mov dl, byte [esp + 0x2f]
add dl, 0x43
mov byte [esp + 0x5f], dl
mov esi, dword [esp + 8]
mov di, word [esi + 0x24]
shr di, 1
mov bx, word [esp + 0x5c]
mov dx, word [esp + 0x3e]
imul dx, dx, 0x255d
mov word [esp + 0x6a], dx
xor bx, 0x5b1e
mov dx, word [esp + 0x3e]
sub cx, dx
mov word [esp + 0x6a], cx
movzx esi, di
mov ah, byte [esp + 0x2f]
sub al, ah
mov byte [esp + 0x5f], al
cmp di, bx
mov dword [esp + 0x18], esi
je 0x40eb88
jmp 0x40eb70