Function at 0x40b964
Capabilities:
Encode data using xor

Disassembly:
push 0x674
mov eax, 0x4e2439
call fcn.004bed19
mov eax, dword [ebp + 8]
mov esi, 0x584840
xor ebx, ebx
mov dword [ebp - 0x664], ebx
push esi
mov dword [ebp - 0x658], eax
mov dword [ebp - 0x680], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, 0x200
push edi
lea eax, [ebp - 0x640]
push ebx
push eax
mov dword [ebp - 4], ebx
call fcn.004be850
add esp, 0xc
call fcn.00499991
push eax
lea ecx, [ebp - 0x65c]
call fcn.004727f7
mov byte [ebp - 4], 1
call fcn.00499991
push eax
lea ecx, [ebp - 0x660]
call fcn.004727f7
push dword [ebp + 0xc]
lea eax, [ebp - 0x65c]
push 0x526688
push eax
mov byte [ebp - 4], 2
call fcn.00402967
add esp, 0xc
lea eax, [ebp - 0x660]
push eax
push dword [ebp - 0x65c]
mov ecx, 0x584a68
call fcn.004a7c0b
test eax, eax
je 0x40ba3f
mov ecx, dword [ebp - 0x658]
lea eax, [ebp - 0x660]
push eax
call fcn.0040228a
mov ecx, dword [ebp - 0x660]
add ecx, 0xfffffff0
call fcn.004027b0
mov ecx, dword [ebp - 0x65c]
add ecx, 0xfffffff0
call fcn.004027b0
push esi
jmp 0x40c4aa
push edi
lea eax, [ebp - 0x640]
push ebx
push eax
call fcn.004be850
add esp, 0xc
push edi
lea eax, [ebp - 0x440]
push ebx
push eax
call fcn.004be850
add esp, 0xc
call fcn.00499991
push eax
lea ecx, [ebp - 0x64c]
call fcn.004727f7
push dword [ebp + 0xc]
mov byte [ebp - 4], 3
push dword [0x584a5c]
lea eax, [ebp - 0x64c]
push eax
call fcn.00402967
add esp, 8
lea eax, [ebp - 0x64c]
mov dword [ebp - 0x654], esp
mov ecx, esp
push eax
lea esi, [ebp - 0x440]
call fcn.0040228a
mov ecx, esi
call fcn.0040b816
pop ecx
test al, al
je 0x40bd90
cmp dword [ebp + 0xc], 6
push 7
pop ecx
mov esi, str.Microsoft_Visual_C_Library
lea edi, [ebp - 0x30]
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov esi, 0x101
lea eax, [ebp - 0x138]
push esi
je 0x40bc28
mov ebx, dword [0x584a64]
xor edi, edi
push edi
push eax
call fcn.004be850
add esp, 0xc
push esi
lea eax, [ebp - 0x240]
push edi
push eax
call fcn.004be850
add esp, 0xc
xor eax, eax
lea ecx, [esi - 1]
mov byte [ebp + eax - 0x138], al
inc eax
cmp eax, ecx
jb 0x40bb04
mov eax, dword [ebx - 0xc]
xor esi, esi
cmp eax, edi
je 0x40bb31
cmp esi, eax
jb 0x40bb1f
xor esi, esi
mov dl, byte [ebx + esi*2]
inc esi
mov byte [ebp + edi - 0x240], dl
inc edi
cmp edi, ecx
jb 0x40bb19
jmp 0x40bb4b
xor eax, eax
cmp esi, 0x1c
jb 0x40bb3a
xor esi, esi
mov dl, byte [ebp + esi - 0x30]
inc esi
mov byte [ebp + eax - 0x240], dl
inc eax
cmp eax, ecx
jb 0x40bb33
xor edx, edx
mov dword [ebp - 0x648], edx
mov eax, 0xff
movzx edi, byte [ebp + edx - 0x240]
add edi, dword [ebp - 0x648]
lea esi, [ebp + edx - 0x138]
mov bl, byte [esi]
mov byte [ebp - 0x641], bl
movzx ebx, bl
add ebx, edi
and ebx, eax
mov edi, ebx
movzx bx, byte [ebp - 0x641]
movzx ebx, bx
mov dword [ebp - 0x648], edi
lea edi, [ebp + edi - 0x138]
mov dword [ebp - 0x654], ebx
mov bl, byte [edi]
mov byte [esi], bl
mov bl, byte [ebp - 0x654]
inc edx
mov byte [edi], bl
cmp edx, ecx
jb 0x40bb58
xor edi, edi
mov dword [ebp - 0x648], edi
mov dword [ebp - 0x650], edi
inc edi
and edi, eax
lea ecx, [ebp + edi - 0x138]
mov dl, byte [ecx]
movzx esi, dl
add esi, dword [ebp - 0x648]
movzx dx, dl
and esi, eax
movzx edx, dx
mov dword [ebp - 0x648], esi
lea esi, [ebp + esi - 0x138]
mov bl, byte [esi]
mov byte [ecx], bl
mov byte [esi], dl
movzx ecx, byte [ecx]
movzx edx, dl
add ecx, edx
mov edx, dword [ebp - 0x650]
and ecx, eax
movzx cx, byte [ebp + ecx - 0x138]
movzx ecx, cx
lea edx, [ebp + edx - 0x440]
xor byte [edx], cl
inc dword [ebp - 0x650]
cmp dword [ebp - 0x650], 0x1fe
jb 0x40bbbb
jmp 0x40bd4a
push ebx
push eax
call fcn.004be850
add esp, 0xc
push esi
lea eax, [ebp - 0x240]
push ebx
push eax
call fcn.004be850
add esp, 0xc
xor eax, eax
mov ecx, 0x100
mov byte [ebp + eax - 0x138], al
inc eax
cmp eax, ecx
jb 0x40bc4a
xor esi, esi
xor edi, edi
cmp esi, 0x1c
jb 0x40bc61
xor esi, esi
mov al, byte [ebp + esi - 0x30]
inc esi
mov byte [ebp + edi - 0x240], al
inc edi
cmp edi, ecx
jb 0x40bc5a
mov dword [ebp - 0x648], ebx
xor edx, edx
mov eax, 0xff
movzx edi, byte [ebp + edx - 0x240]
add edi, dword [ebp - 0x648]
lea esi, [ebp + edx - 0x138]
mov bl, byte [esi]
mov byte [ebp - 0x641], bl
movzx ebx, bl
add ebx, edi
and ebx, eax
mov edi, ebx
movzx bx, byte [ebp - 0x641]
movzx ebx, bx
mov dword [ebp - 0x648], edi
lea edi, [ebp + edi - 0x138]
mov dword [ebp - 0x654], ebx
mov bl, byte [edi]
mov byte [esi], bl
mov bl, byte [ebp - 0x654]
inc edx
mov byte [edi], bl
cmp edx, ecx
jb 0x40bc7f
xor edi, edi
mov dword [ebp - 0x648], edi
mov dword [ebp - 0x650], edi
inc edi
and edi, eax
lea edx, [ebp + edi - 0x138]
mov cl, byte [edx]
movzx esi, cl
add esi, dword [ebp - 0x648]
movzx cx, cl
and esi, eax
movzx ecx, cx
mov dword [ebp - 0x648], esi
lea esi, [ebp + esi - 0x138]
mov bl, byte [esi]
mov byte [edx], bl
mov byte [esi], cl
movzx edx, byte [edx]
movzx ecx, cl
add ecx, edx
mov edx, dword [ebp - 0x650]
and ecx, eax
movzx cx, byte [ebp + ecx - 0x138]
movzx ecx, cx
lea edx, [ebp + edx - 0x440]
xor byte [edx], cl
inc dword [ebp - 0x650]
cmp dword [ebp - 0x650], 0x1fe
jb 0x40bce2
push eax
lea eax, [ebp - 0x440]
push eax
lea eax, [ebp - 0x640]
xor ecx, ecx
push eax
mov word [ebp - 0x242], cx
call fcn.004ba74e
add esp, 0xc
cmp dword [ebp + 0xc], 6
jne 0x40bd81
lea eax, [ebp - 0x640]
push eax
mov ecx, 0x584a64
call fcn.004026bd
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x64c]
jmp 0x40c456
mov ecx, dword [ebp - 0x64c]
add ecx, 0xfffffff0
call fcn.004027b0
lea eax, [ebp - 0x654]
mov ebx, SysReAllocString
push eax
lea esi, [ebp - 0x67c]
mov dword [ebp - 0x654], ebx
call fcn.0040a64a
mov byte [ebp - 4], 4
call fcn.00499991
push eax
lea ecx, [ebp - 0x650]
call fcn.004727f7
push dword [ebp + 0xc]
mov byte [ebp - 4], 5
push dword [0x584a4c]
lea eax, [ebp - 0x650]
push dword [0x584a54]
push eax
call fcn.00402967
add esp, 0x10
call fcn.00499991
push eax
lea ecx, [ebp - 0x654]
call fcn.004727f7
mov byte [ebp - 4], 6
mov dword [ebp - 0x664], edi
mov edi, dword [ebp - 0x650]
push 1
push edi
push ebx
mov dword [ebp - 0x67c], 0x20019
call fcn.0040a666
mov ebx, dword [ebp - 0x654]
test eax, eax
je 0x40c14c
push ebx
mov eax, esi
push eax
call fcn.0040a6d7
test eax, eax
je 0x40c431
lea eax, [ebp - 0x664]
push eax
lea eax, [ebp - 0x440]
push eax
push ebx
mov eax, esi
push eax
call fcn.0040a8bf
test eax, eax
je 0x40c431
call fcn.0040a6c4
push 7
pop ecx
mov esi, str.Microsoft_Visual_C_Library
lea edi, [ebp - 0x30]
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov esi, 0x101
xor edi, edi
cmp dword [ebp + 0xc], 6
push esi
lea eax, [ebp - 0x138]
push edi
push eax
je 0x40bfd9
mov ebx, dword [0x584a64]
call fcn.004be850
add esp, 0xc
push esi
lea eax, [ebp - 0x240]
push edi
push eax
call fcn.004be850
add esp, 0xc
xor eax, eax
lea ecx, [esi - 1]
mov byte [ebp + eax - 0x138], al
inc eax
cmp eax, ecx
jb 0x40beb5
mov eax, dword [ebx - 0xc]
xor esi, esi
cmp eax, edi
je 0x40bee2
cmp esi, eax
jb 0x40bed0
xor esi, esi
mov dl, byte [ebx + esi*2]
inc esi
mov byte [ebp + edi - 0x240], dl
inc edi
cmp edi, ecx
jb 0x40beca
jmp 0x40befc
xor eax, eax
cmp esi, 0x1c
jb 0x40beeb
xor esi, esi
mov dl, byte [ebp + esi - 0x30]
inc esi
mov byte [ebp + eax - 0x240], dl
inc eax
cmp eax, ecx
jb 0x40bee4
xor edx, edx
mov dword [ebp - 0x648], edx
mov eax, 0xff
movzx edi, byte [ebp + edx - 0x240]
add edi, dword [ebp - 0x648]
lea esi, [ebp + edx - 0x138]
mov bl, byte [esi]
mov byte [ebp - 0x641], bl
movzx ebx, bl
add ebx, edi
and ebx, eax
mov edi, ebx
movzx bx, byte [ebp - 0x641]
movzx ebx, bx
mov dword [ebp - 0x648], edi
lea edi, [ebp + edi - 0x138]
mov dword [ebp - 0x64c], ebx
mov bl, byte [edi]
mov byte [esi], bl
mov bl, byte [ebp - 0x64c]
inc edx
mov byte [edi], bl
cmp edx, ecx
jb 0x40bf09
xor edi, edi
mov dword [ebp - 0x648], edi
mov dword [ebp - 0x64c], edi
inc edi
and edi, eax
lea edx, [ebp + edi - 0x138]
mov cl, byte [edx]
movzx esi, cl
add esi, dword [ebp - 0x648]
movzx cx, cl
and esi, eax
movzx ecx, cx
mov dword [ebp - 0x648], esi
lea esi, [ebp + esi - 0x138]
mov bl, byte [esi]
mov byte [edx], bl
mov byte [esi], cl
movzx edx, byte [edx]
movzx ecx, cl
add ecx, edx
mov edx, dword [ebp - 0x64c]
and ecx, eax
movzx cx, byte [ebp + ecx - 0x138]
movzx ecx, cx
lea edx, [ebp + edx - 0x440]
xor byte [edx], cl
inc dword [ebp - 0x64c]
cmp dword [ebp - 0x64c], 0x1fe
jb 0x40bf6c
jmp 0x40c0f9
call fcn.004be850
add esp, 0xc
push esi
lea eax, [ebp - 0x240]
push edi
push eax
call fcn.004be850
add esp, 0xc
xor eax, eax
mov ecx, 0x100
mov byte [ebp + eax - 0x138], al
inc eax
cmp eax, ecx
jb 0x40bff9
xor eax, eax
xor esi, esi
cmp eax, 0x1c
jb 0x40c010
xor eax, eax
mov dl, byte [ebp + eax - 0x30]
inc eax
mov byte [ebp + esi - 0x240], dl
inc esi
cmp esi, ecx
jb 0x40c009
mov dword [ebp - 0x648], edi
xor edx, edx
mov eax, 0xff
movzx edi, byte [ebp + edx - 0x240]
add edi, dword [ebp - 0x648]
lea esi, [ebp + edx - 0x138]
mov bl, byte [esi]
mov byte [ebp - 0x641], bl
movzx ebx, bl
add ebx, edi
and ebx, eax
mov edi, ebx
movzx bx, byte [ebp - 0x641]
movzx ebx, bx
mov dword [ebp - 0x648], edi
lea edi, [ebp + edi - 0x138]
mov dword [ebp - 0x64c], ebx
mov bl, byte [edi]
mov byte [esi], bl
mov bl, byte [ebp - 0x64c]
inc edx
mov byte [edi], bl
cmp edx, ecx
jb 0x40c02e
xor edi, edi
mov dword [ebp - 0x648], edi
mov dword [ebp - 0x64c], edi
inc edi
and edi, eax
lea edx, [ebp + edi - 0x138]
mov cl, byte [edx]
movzx esi, cl
add esi, dword [ebp - 0x648]
movzx cx, cl
and esi, eax
movzx ecx, cx
mov dword [ebp - 0x648], esi
lea esi, [ebp + esi - 0x138]
mov bl, byte [esi]
mov byte [edx], bl
mov byte [esi], cl
movzx edx, byte [edx]
movzx ecx, cl
add ecx, edx
mov edx, dword [ebp - 0x64c]
and ecx, eax
movzx cx, byte [ebp + ecx - 0x138]
movzx ecx, cx
lea edx, [ebp + edx - 0x440]
xor byte [edx], cl
inc dword [ebp - 0x64c]
cmp dword [ebp - 0x64c], 0x1fe
jb 0x40c091
push eax
lea eax, [ebp - 0x440]
push eax
lea eax, [ebp - 0x640]
xor ecx, ecx
push eax
mov word [ebp - 0x242], cx
call fcn.004ba74e
add esp, 0xc
cmp dword [ebp + 0xc], 6
jne 0x40c130
lea eax, [ebp - 0x640]
push eax
mov ecx, 0x584a64
call fcn.004026bd
mov ecx, dword [ebp - 0x654]
add ecx, 0xfffffff0
call fcn.004027b0
mov ecx, dword [ebp - 0x650]
add ecx, 0xfffffff0
jmp 0x40c43c
push 1
push edi
push reloc.OLEAUT32.dll_SysReAllocString
lea esi, [ebp - 0x67c]
call fcn.0040a666
test eax, eax
je 0x40c431
push ebx
mov eax, esi
push eax
call fcn.0040a6d7
test eax, eax
je 0x40c431
lea eax, [ebp - 0x664]
push eax
lea eax, [ebp - 0x440]
push eax
push ebx
mov eax, esi
push eax
call fcn.0040a8bf
test eax, eax
je 0x40c431
call fcn.0040a6c4
push 7
pop ecx
mov esi, str.Microsoft_Visual_C_Library
lea edi, [ebp - 0x30]
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov esi, 0x101
xor edi, edi
cmp dword [ebp + 0xc], 6
push esi
lea eax, [ebp - 0x138]
push edi
push eax
je 0x40c30c
mov ebx, dword [0x584a64]
call fcn.004be850
add esp, 0xc
push esi
lea eax, [ebp - 0x240]
push edi
push eax
call fcn.004be850
add esp, 0xc
xor eax, eax
lea ecx, [esi - 1]
mov byte [ebp + eax - 0x138], al
inc eax
cmp eax, ecx
jb 0x40c1e8
mov eax, dword [ebx - 0xc]
xor esi, esi
cmp eax, edi
je 0x40c215
cmp esi, eax
jb 0x40c203
xor esi, esi
mov dl, byte [ebx + esi*2]
inc esi
mov byte [ebp + edi - 0x240], dl
inc edi
cmp edi, ecx
jb 0x40c1fd
jmp 0x40c22f
xor eax, eax
cmp esi, 0x1c
jb 0x40c21e
xor esi, esi
mov dl, byte [ebp + esi - 0x30]
inc esi
mov byte [ebp + eax - 0x240], dl
inc eax
cmp eax, ecx
jb 0x40c217
xor edx, edx
mov dword [ebp - 0x648], edx
mov eax, 0xff
movzx edi, byte [ebp + edx - 0x240]
add edi, dword [ebp - 0x648]
lea esi, [ebp + edx - 0x138]
mov bl, byte [esi]
mov byte [ebp - 0x641], bl
movzx ebx, bl
add ebx, edi
and ebx, eax
mov edi, ebx
movzx bx, byte [ebp - 0x641]
movzx ebx, bx
mov dword [ebp - 0x648], edi
lea edi, [ebp + edi - 0x138]
mov dword [ebp - 0x64c], ebx
mov bl, byte [edi]
mov byte [esi], bl
mov bl, byte [ebp - 0x64c]
inc edx
mov byte [edi], bl
cmp edx, ecx
jb 0x40c23c
xor edi, edi
mov dword [ebp - 0x648], edi
mov dword [ebp - 0x64c], edi
inc edi
and edi, eax
lea ecx, [ebp + edi - 0x138]
mov dl, byte [ecx]
movzx esi, dl
add esi, dword [ebp - 0x648]
movzx dx, dl
and esi, eax
movzx edx, dx
mov dword [ebp - 0x648], esi
lea esi, [ebp + esi - 0x138]
mov bl, byte [esi]
mov byte [ecx], bl
mov byte [esi], dl
movzx ecx, byte [ecx]
movzx edx, dl
add ecx, edx
mov edx, dword [ebp - 0x64c]
and ecx, eax
movzx cx, byte [ebp + ecx - 0x138]
movzx ecx, cx
lea edx, [ebp + edx - 0x440]
xor byte [edx], cl
inc dword [ebp - 0x64c]
cmp dword [ebp - 0x64c], 0x1fe
jb 0x40c29f
jmp 0x40c0f9
call fcn.004be850
add esp, 0xc
push esi
lea eax, [ebp - 0x240]
push edi
push eax
call fcn.004be850
add esp, 0xc
xor eax, eax
mov ecx, 0x100
mov byte [ebp + eax - 0x138], al
inc eax
cmp eax, ecx
jb 0x40c32c
xor eax, eax
xor esi, esi
cmp eax, 0x1c
jb 0x40c343
xor eax, eax
mov dl, byte [ebp + eax - 0x30]
inc eax
mov byte [ebp + esi - 0x240], dl
inc esi
cmp esi, ecx
jb 0x40c33c
mov dword [ebp - 0x648], edi
xor edx, edx
mov eax, 0xff
movzx edi, byte [ebp + edx - 0x240]
add edi, dword [ebp - 0x648]
lea esi, [ebp + edx - 0x138]
mov bl, byte [esi]
mov byte [ebp - 0x641], bl
movzx ebx, bl
add ebx, edi
and ebx, eax
mov edi, ebx
movzx bx, byte [ebp - 0x641]
movzx ebx, bx
mov dword [ebp - 0x648], edi
lea edi, [ebp + edi - 0x138]
mov dword [ebp - 0x64c], ebx
mov bl, byte [edi]
mov byte [esi], bl
mov bl, byte [ebp - 0x64c]
inc edx
mov byte [edi], bl
cmp edx, ecx
jb 0x40c361
xor edi, edi
mov dword [ebp - 0x648], edi
mov dword [ebp - 0x64c], edi
inc edi
and edi, eax
lea edx, [ebp + edi - 0x138]
mov cl, byte [edx]
movzx esi, cl
add esi, dword [ebp - 0x648]
movzx cx, cl
and esi, eax
movzx ecx, cx
mov dword [ebp - 0x648], esi
lea esi, [ebp + esi - 0x138]
mov bl, byte [esi]
mov byte [edx], bl
mov byte [esi], cl
movzx edx, byte [edx]
movzx ecx, cl
add ecx, edx
mov edx, dword [ebp - 0x64c]
and ecx, eax
movzx cx, byte [ebp + ecx - 0x138]
movzx ecx, cx
lea edx, [ebp + edx - 0x440]
xor byte [edx], cl
inc dword [ebp - 0x64c]
cmp dword [ebp - 0x64c], 0x1fe
jb 0x40c3c4
jmp 0x40c0f9
lea ecx, [ebx - 0x10]
call fcn.004027b0
lea ecx, [edi - 0x10]
call fcn.004027b0
lea esi, [ebp - 0x67c]
mov byte [ebp - 4], 2
call fcn.0040a6c4
mov ecx, dword [ebp - 0x674]
add ecx, 0xfffffff0
call fcn.004027b0
mov esi, dword [ebp - 0x65c]
push esi
mov ecx, 0x584a68
call fcn.004a7d87
lea ecx, [ebp - 0x640]
push ecx
mov ecx, eax
call fcn.004026bd
mov ecx, dword [ebp - 0x658]
lea eax, [ebp - 0x640]
push eax
call fcn.004024df
mov ecx, dword [ebp - 0x660]
add ecx, 0xfffffff0
call fcn.004027b0
lea ecx, [esi - 0x10]
call fcn.004027b0
push 0x584840
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0x658]
call fcn.004bed9c
ret 8