Function at 0x407d89
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x45e611
call fcn.00436808
sub esp, 0x150
mov eax, dword [0x48ed30]
push ebx
push esi
push edi
xor edi, edi
push edi
mov dword [ebp - 0x10], eax
mov ebx, ecx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov esi, dword [eax + 0x3c]
add esi, eax
cmp word [esi + 6], di
movzx eax, word [esi + 0x14]
lea eax, [eax + esi + 0x18]
mov dword [ebp - 0x128], edi
jbe 0x407e1e
mov dword [ebp - 0x12c], eax
push str..phs
push dword [ebp - 0x12c]
call fcn.00437540
test eax, eax
pop ecx
pop ecx
je 0x407dff
movzx eax, word [esi + 6]
inc dword [ebp - 0x128]
add dword [ebp - 0x12c], 0x28
cmp dword [ebp - 0x128], eax
jl 0x407dce
jmp 0x407e1e
mov eax, dword [ebp - 0x12c]
mov eax, dword [eax + 0xc]
add eax, dword [esi + 0x34]
push 0x1b4
push eax
push 0x4900b0
call fcn.004368c0
add esp, 0xc
cmp dword [0x4900b0], edi
je 0x407fda
mov esi, 0x104
push esi
lea eax, [ebp - 0x124]
push edi
push eax
call fcn.00436f80
add esp, 0xc
push esi
lea eax, [ebp - 0x124]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x124]
lea esi, [ebx + 0x24]
push eax
mov ecx, esi
call fcn.00401575
push dword [0x490260]
push edi
push ebx
push esi
call fcn.00407c78
add esp, 0x10
test al, al
je 0x407fc2
mov eax, dword [ebx + 4]
lea esi, [ebx + 0x10]
push eax
mov ecx, esi
call fcn.004077cc
cmp dword [0x4900b0], edi
je 0x407fda
mov eax, 0x1b4
xor byte [0x4900b4], 0xe3
dec eax
jne 0x407e9f
push str..pecode
lea ecx, [ebp - 0x15c]
call fcn.004015b0
lea eax, [ebp - 0x15c]
push eax
mov ecx, esi
call fcn.00407804
push edi
push 1
lea ecx, [ebp - 0x15c]
mov esi, eax
call fcn.0040117c
cmp esi, edi
je 0x407fda
test byte [esi + 0x27], 0x80
je 0x407fda
cmp dword [esi + 0x10], edi
je 0x407fda
push 0x10
lea eax, [ebp - 0x20]
push edi
push eax
call fcn.00436f80
push 0x10
lea eax, [ebp - 0x20]
push 0x4900b5
push eax
call fcn.004368c0
add esp, 0x18
lea ecx, [ebp - 0x130]
call fcn.0040ea17
push 1
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x130]
mov dword [ebp - 4], edi
call fcn.0040ea35
mov dword [ebp - 0x13c], edi
mov dword [ebp - 0x138], edi
mov dword [ebp - 0x134], edi
mov eax, dword [esi + 0x10]
push edi
push eax
lea ecx, [ebp - 0x140]
mov byte [ebp - 4], 1
call fcn.00407c01
push dword [ebp - 0x13c]
mov ecx, dword [ebx + 4]
mov eax, dword [esi + 0x14]
push dword [esi + 0x10]
add eax, ecx
push eax
lea ecx, [ebp - 0x130]
call fcn.0040eb52
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 8]
cmp eax, ecx
jb 0x407f7f
mov eax, ecx
lea ecx, [ebp - 0x128]
push ecx
push eax
mov eax, dword [ebx + 0x18]
mov eax, dword [eax + 0x34]
push dword [ebp - 0x13c]
add eax, dword [esi + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
lea ecx, [ebp - 0x140]
jne 0x407fc6
call fcn.00410565
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x130]
call fcn.0040ea21
xor al, al
jmp 0x407fdc
call fcn.00410565
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x130]
call fcn.0040ea21
mov al, 1
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop ebx
call fcn.00436708
leave
ret