Function at 0x1003d578
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x1005f78f
call fcn.1005dc80
sub esp, 0x50
cmp byte [ebp + 0x18], 0
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
mov esi, ecx
mov byte [ebp - 0x14], dl
je 0x1003d7f2
test dl, dl
je 0x1003d7e8
mov edi, dword [ebp + 0x10]
lea ecx, [ebp - 0x44]
mov edx, dword [ebp + 0x14]
xor esi, esi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x1c], esi
call fcn.1003ccd4
mov edx, dword [ebp + 0xc]
lea ecx, [ebp - 0x38]
and dword [ebp - 4], esi
call fcn.1003ccd4
xor ebx, ebx
inc ebx
mov byte [ebp - 4], bl
mov ecx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x40]
sub ecx, dword [ebp - 0x38]
sub eax, dword [ebp - 0x44]
and dword [ebp - 0x18], esi
sar ecx, 2
sar eax, 2
cmp eax, ecx
jbe 0x1003d697
mov dword [ebp - 0x20], 0x24f1
cmp dword [ebp - 0x20], 0x254e
jle 0x1003d61e
xor edi, edi
mov eax, edi
mov ecx, 0x10079ad8
xor eax, esi
cdq
push edx
push eax
call fcn.1000fde8
inc edi
cmp edi, 0x35d4
jl 0x1003d5fb
inc esi
cmp esi, 0x726f
jl 0x1003d5f9
push ebx
push ecx
push 0x667e
lea eax, [ebp - 0x18]
push eax
push 0x3478
lea ecx, [ebp - 0x44]
call fcn.1003d89f
add esp, 0x14
mov byte [ebp - 4], 2
cmp dword [ebp - 0x20], 0x2237
jge 0x1003d67a
mov edx, str.eyxklx_erejuwr_cqwuk_wxjomtowb_ysrjmha_uzadb_tixelxgil_qts_tfety_kkhcz_ljz_gtzjvskyn
mov ecx, 0x10079ad8
call fcn.10012b8c
jmp 0x1003d67a
lea eax, [ebp + 0x18]
mov dword [ebp - 4], ebx
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x38]
push eax
push ebx
call fcn.1003da74
mov esi, dword [ebp - 0x1c]
add esp, 0x10
jmp 0x1003d6d5
push ecx
push ecx
lea eax, [ebp - 0x38]
mov dl, bl
push eax
push ecx
push ecx
lea ecx, [ebp - 0x18]
call fcn.1003d542
lea eax, [ebp + 0x18]
mov edx, 0x7c6b
push eax
push ebx
push 0x7a2a
push ebx
lea eax, [ebp - 0x44]
xor cl, cl
push eax
push 0x7cb
lea eax, [ebp - 0x18]
push 0x54c5
push eax
call fcn.1003d0b7
add esp, 0x34
xor edx, edx
mov dword [ebp + 0x18], edx
cmp edx, dword [ebp - 0x18]
jge 0x1003d7d1
test esi, esi
jne 0x1003d7d1
lea eax, [ebp - 0x44]
push eax
push 0x339c
lea eax, [ebp + 0x18]
push eax
push esi
lea edx, [ebp - 0x38]
lea ecx, [ebp - 0x1c]
call fcn.1003db47
mov edx, dword [ebp + 0x18]
add esp, 0x10
mov eax, dword [ebp - 0x44]
mov ecx, dword [eax + edx*4]
mov eax, dword [ebp - 0x38]
cmp ecx, dword [eax + edx*4]
jge 0x1003d7c8
push ebx
push ecx
push ecx
push 0x3cf3
push ecx
lea eax, [ebp - 0x1c]
mov edx, 0x6e52
push eax
push ecx
call fcn.1003d428
mov dword [ebp - 0x28], 0x3d4e
add esp, 0x1c
cmp dword [ebp - 0x28], 0x4068
jle 0x1003d7ae
xor edi, edi
xor esi, esi
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x20], 0x3e12
mov ecx, esi
mov eax, edi
sar eax, cl
lea ecx, [ebp - 0x5c]
cdq
push edx
push eax
call fcn.10001b3f
pop ecx
pop ecx
cmp dword [eax + 0x14], 0x10
jb 0x1003d773
mov eax, dword [eax]
push eax
call fcn.10047293
pop ecx
push 0
push ebx
lea ecx, [ebp - 0x5c]
call fcn.1001084f
dec esi
dec dword [ebp - 0x20]
jne 0x1003d758
mov esi, dword [ebp - 0x24]
inc esi
mov dword [ebp - 0x24], esi
cmp esi, 0x38bd
jl 0x1003d74e
inc edi
cmp edi, 0x1ec6
jl 0x1003d749
push 0x135f
call dword [sym.imp.GDI32.dll_EndPage]
cmp dword [ebp - 0x28], 0x3c4e
jge 0x1003d7c2
push str.qjrwi_uqhtbxrp_zkritef_enwilhqu_thi_owepz
call fcn.10047293
pop ecx
mov dword [ebp - 4], ebx
mov edx, dword [ebp + 0x18]
mov esi, dword [ebp - 0x1c]
inc edx
jmp 0x1003d6d7
mov eax, dword [ebp + 0x10]
lea ecx, [ebp - 0x38]
mov dword [eax], esi
call fcn.10040846
lea ecx, [ebp - 0x44]
call fcn.10040846
jmp 0x1003d811
push 0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x1003d811
mov edx, dword [ebp + 8]
xor ebx, ebx
inc ebx
mov dword [edx], 0
jmp 0x1003d80d
mov ecx, dword [edx]
mov eax, dword [esi]
mov dword [eax + ecx*4], 0x1ded6804
inc dword [edx]
cmp dword [edx], ebx
jl 0x1003d800
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret