Function at 0x403510
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x417174]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [0x4170f6], 0
je 0x403544
push 0x104
push dword [0x417150]
push dword [0x41712c]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x403554
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040658e
mov esp, ebp
pop ebp
ret
push ebx
push 0x80000000
push dword [0x417150]
call fcn.00401270
mov ebx, eax
add esp, 8
mov dword [ebp - 0x38], ebx
cmp ebx, 0xffffffff
jne 0x403583
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040658e
mov esp, ebp
pop ebp
ret
push 0
push dword [0x4170f6]
push ebx
call fcn.00401370
add esp, 0xc
xor eax, eax
push esi
mov word [ebp - 0x10], ax
push edi
lea esp, [esp]
push 0xc
lea eax, [ebp - 0x10]
push eax
push ebx
call fcn.004012a0
mov edi, eax
add esp, 0xc
mov dword [ebp - 0x14], edi
test edi, edi
jne 0x403994
mov ecx, dword [ebp - 0xc]
or ecx, dword [ebp - 8]
je 0x403979
push ebx
call fcn.00401240
add esp, 4
mov ecx, eax
add ecx, dword [ebp - 0xc]
mov esi, edx
adc esi, dword [ebp - 8]
mov dword [ebp - 0x30], ecx
movzx ecx, word [ebp - 0x10]
add ecx, 0xffffedcc
mov dword [ebp - 0x34], esi
cmp ecx, 8
ja case.0x4035f4.4664
jmp dword [ecx*4 + 0x403a0c]
push 0x417fc0
call fcn.00402930
push 0
push 0x417fc0
lea eax, [ebp - 0x10]
push eax
push ebx
call fcn.004012e0
add esp, 0x14
jmp 0x403948
push 2
lea eax, [ebp - 0x24]
push eax
push ebx
call fcn.004012a0
movzx ecx, word [ebp - 0x24]
xor esi, esi
mov edx, 1
add esp, 0xc
cmp word [ebp - 0x24], dx
mov dword [ebp - 0x20], esi
cmovb edx, ecx
xor eax, eax
cmp ax, dx
jae case.0x4035f4.4664
lea ecx, [ecx]
push 2
lea eax, [ebp - 0x1c]
push eax
push ebx
call fcn.004012a0
mov cx, word [ebp - 0x1c]
add esp, 0xc
test cx, cx
je 0x4036ef
movzx eax, si
lea esi, [eax*4 + 0x417fe4]
movzx eax, cx
push esi
lea eax, [eax*4 + 4]
push eax
call fcn.004028f0
add esp, 8
test eax, eax
je 0x40398d
mov esi, dword [esi]
xor eax, eax
xor edi, edi
cmp ax, word [ebp - 0x1c]
jae 0x4036e9
mov edi, edi
push 2
lea eax, [ebp - 0x28]
push eax
push ebx
call fcn.004012a0
movzx eax, word [ebp - 0x28]
push esi
lea eax, [eax*2 + 2]
push eax
call fcn.004028f0
add esp, 0x14
test eax, eax
je 0x403711
mov ax, word [ebp - 0x28]
test ax, ax
je 0x4036df
movzx eax, ax
add eax, eax
push eax
push dword [esi]
push ebx
call fcn.004012a0
add esp, 0xc
inc edi
add esi, 4
cmp di, word [ebp - 0x1c]
jb 0x4036a0
mov edi, dword [ebp - 0x14]
mov esi, dword [ebp - 0x20]
movzx ecx, word [ebp - 0x24]
inc esi
mov edx, 1
cmp word [ebp - 0x24], dx
mov dword [ebp - 0x20], esi
cmovb edx, ecx
cmp si, dx
jb 0x403650
jmp 0x40394d
mov edi, 7
mov dword [ebp - 0x14], edi
jmp 0x4036ec
push ebx
call fcn.00403a30
add esp, 4
jmp 0x403948
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x10]
push eax
push ebx
call fcn.004012e0
mov ecx, dword [ebp - 0x18]
add esp, 0x10
mov edi, eax
mov dword [ebp - 0x14], edi
test ecx, ecx
je 0x40394d
cmp dword [0x417fdc], 0
jne 0x40376a
mov eax, dword [ebp - 0x2c]
mov dword [0x417fdc], eax
mov dword [0x417fe0], ecx
jmp 0x40394d
mov eax, dword [0x417fe0]
add eax, ecx
push 0x417fdc
push eax
call fcn.00402950
add esp, 8
test eax, eax
je 0x40398d
mov eax, dword [0x417fe0]
mov ecx, dword [0x417fdc]
dec eax
cmp word [ecx + eax*2], 0
lea eax, [ecx + eax*2]
jne 0x40394d
push dword [ebp - 0x18]
push dword [ebp - 0x2c]
push eax
call fcn.004065f0
mov eax, dword [0x417fe0]
dec eax
add esp, 0xc
add eax, dword [ebp - 0x18]
mov dword [0x417fe0], eax
jmp 0x40394d
push ebx
call fcn.00403c00
add esp, 4
jmp 0x403948
push ebx
call fcn.00403e20
add esp, 4
jmp 0x403948
cmp dword [0x417fb8], 0
jne case.0x4035f4.4664
push 0x417fbc
push 0x417fb8
lea eax, [ebp - 0x10]
push eax
push ebx
call fcn.004012e0
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x403999
mov esi, dword [0x417fbc]
mov ecx, dword [0x417fb8]
sub esi, 8
mov eax, esi
xor eax, 0x1b5b
mov dword [0x417fbc], esi
cmp eax, dword [ecx]
jne 0x403913
lea edx, [ecx + 8]
mov ecx, esi
shr esi, 2
test esi, esi
je 0x40387e
lea ecx, [ecx]
mov eax, ecx
shr eax, 0x1f
add edx, 4
lea ecx, [eax + ecx*2]
movzx eax, byte [edx - 4]
add ecx, eax
mov eax, ecx
shr eax, 0x1f
lea ecx, [eax + ecx*2]
movzx eax, byte [edx - 3]
add ecx, eax
mov eax, ecx
shr eax, 0x1f
lea ecx, [eax + ecx*2]
movzx eax, byte [edx - 2]
add ecx, eax
mov eax, ecx
shr eax, 0x1f
lea ecx, [eax + ecx*2]
movzx eax, byte [edx - 1]
add ecx, eax
dec esi
jne 0x403840
mov eax, dword [0x417fbc]
mov esi, eax
and esi, 3
jbe 0x4038a9
lea ebx, [ebx]
mov eax, ecx
shr eax, 0x1f
lea edx, [edx + 1]
lea ecx, [eax + ecx*2]
movzx eax, byte [edx - 1]
add ecx, eax
dec esi
jne 0x403890
mov eax, dword [0x417fbc]
mov edx, dword [0x417fb8]
cmp ecx, dword [edx + 4]
jne 0x403913
push eax
lea eax, [edx + 8]
push eax
push edx
call fcn.004070e0
add esp, 0xc
cmp dword [0x417fbc], 0
mov dh, 0x5b
mov dword [ebp - 0x20], 0
jbe 0x403968
mov ebx, dword [ebp - 0x20]
jmp 0x4038e0
mov ecx, dword [0x417fb8]
mov dl, byte [ecx + ebx]
mov al, dl
xor al, dh
mov byte [ecx + ebx], al
mov al, bl
add al, dl
inc ebx
add dh, al
cmp ebx, dword [0x417fbc]
jb 0x4038e0
push dword [ebp - 0x34]
mov ebx, dword [ebp - 0x38]
push dword [ebp - 0x30]
push ebx
call fcn.00401370
add esp, 0xc
jmp 0x40397c
push 0x417fb8
call fcn.00402930
add esp, 4
push dword [ebp - 0x34]
push dword [ebp - 0x30]
push ebx
call fcn.00401370
add esp, 0xc
jmp 0x40397c
push 0x41713c
push 0x417140
lea eax, [ebp - 0x10]
push eax
push ebx
call fcn.004012e0
add esp, 0x10
mov edi, eax
mov dword [ebp - 0x14], edi
test edi, edi
mov edi, dword [ebp - 0x14]
jne 0x403999
push dword [ebp - 0x34]
push dword [ebp - 0x30]
push ebx
call fcn.00401370
add esp, 0xc
jmp 0x40397c
mov edi, dword [ebp - 0x14]
push dword [ebp - 0x34]
push dword [ebp - 0x30]
push ebx
call fcn.00401370
add esp, 0xc
jmp 0x40397c
mov edi, dword [ebp - 0x14]
mov eax, 0x7f7f
cmp word [ebp - 0x10], ax
jne 0x4035a0
jmp 0x403999
mov edi, 7
jmp 0x403999
mov edi, 8
push ebx
call fcn.004011f0
add esp, 4
test edi, edi
je 0x4039f3
lea eax, [ebp - 0x18]
push eax
push 0x800
call fcn.004028f0
add esp, 8
test eax, eax
je 0x4039e0
push dword [0x417150]
push edi
push dword [ebp - 0x18]
call fcn.00402f20
push 0x40
push dword [ebp - 0x18]
call fcn.00403370
lea eax, [ebp - 0x18]
push eax
call fcn.00402930
add esp, 0x18
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040658e
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov eax, 1
pop ebx
call fcn.0040658e
mov esp, ebp
pop ebp
ret