Function at 0x409820
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4253c0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x68
mov ecx, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ecx + 8]
push edi
mov dword [esp + 0xc], esi
cmp esi, 0x33
jae 0x409884
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.CGifObfuscator::GetData
push str._s_tGot_abnormal_file_size__d_tGLE:_08x
call fcn.004012a0
push eax
call fcn.00401330
add esp, 0x14
xor al, al
mov ecx, dword [esp + 0x74]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ecx + 4]
movzx dx, byte [eax + 0xc]
movzx ax, byte [eax + 0xb]
shl dx, 8
or dx, ax
movzx eax, dx
movzx ebx, ax
cmp ebx, esi
ja 0x409870
sub esi, ebx
cmp esi, 0x28
jae 0x4098e0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CGifObfuscator::GetData
push str._s_tData_chunk_is_too_small_for_header_tGLE:_08x
push ecx
call fcn.004012a0
add esp, 4
push eax
call fcn.00401330
add esp, 0x10
xor al, al
mov ecx, dword [esp + 0x74]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ecx + 4]
lea esi, [ebx + ecx]
mov ecx, 0xa
lea edi, [esp + 0x48]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x48]
cmp ecx, 1
jae 0x409915
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x48]
push eax
push ecx
push str.CGifObfuscator::GetData
push str._s_tSeems_empty_data__dwLen_d_tGLE:_08x
jmp 0x409862
mov eax, dword [esp + 0xc]
sub eax, ebx
sub eax, 0x28
cmp ecx, eax
jbe 0x409959
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CGifObfuscator::GetData
push str._s_tData_block_ends_beyond_of_file_tGLE:_08x
push ecx
call fcn.004012a0
add esp, 4
push eax
call fcn.00401330
add esp, 0x10
xor al, al
mov ecx, dword [esp + 0x74]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor edi, edi
mov dword [esp + 0x44], 0xf
mov dword [esp + 0x40], edi
mov byte [esp + 0x30], 0
push 0x20
lea edx, [esp + 0x54]
push edx
lea ecx, [esp + 0x34]
mov dword [esp + 0x84], edi
call fcn.00402050
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0x48]
mov eax, dword [eax + 4]
mov esi, dword [ebp + 0xc]
push ecx
lea edx, [ebx + eax + 0x28]
push edx
mov ecx, esi
call fcn.00404870
xor eax, eax
cmp dword [esp + 0x48], edi
je 0x4099ba
mov dl, byte [esp + 0x4c]
mov ecx, dword [esi + 4]
xor byte [ecx + eax], dl
inc dword [esp + 0x4c]
inc eax
cmp eax, dword [esp + 0x48]
jne 0x4099a5
lea eax, [esp + 0x10]
push esi
push eax
call fcn.0040a420
add esp, 8
mov byte [esp + 0x7c], 1
mov eax, dword [esp + 0x30]
mov esi, 0x10
cmp dword [esp + 0x44], esi
jae 0x4099e0
lea eax, [esp + 0x30]
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x24]
push ecx
push eax
push edx
push edi
lea ecx, [esp + 0x20]
call fcn.004035b0
test eax, eax
je 0x409a6b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CGifObfuscator::GetData
push str._s_tChecksums_doesnt_match_tGLE:_08x
push ecx
call fcn.004012a0
add esp, 4
push eax
call fcn.00401330
add esp, 0x10
cmp dword [esp + 0x28], esi
jb 0x409a2f
mov eax, dword [esp + 0x14]
push eax
call fcn.004136f1
add esp, 4
mov dword [esp + 0x28], 0xf
mov dword [esp + 0x24], edi
mov byte [esp + 0x14], 0
cmp dword [esp + 0x44], esi
jb 0x409870
mov ecx, dword [esp + 0x30]
push ecx
call fcn.004136f1
add esp, 4
xor al, al
mov ecx, dword [esp + 0x74]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esp + 0x28], esi
jb 0x409a7e
mov edx, dword [esp + 0x14]
push edx
call fcn.004136f1
add esp, 4
mov dword [esp + 0x28], 0xf
mov dword [esp + 0x24], edi
mov byte [esp + 0x14], 0
cmp dword [esp + 0x44], esi
jb 0x409aa2
mov eax, dword [esp + 0x30]
push eax
call fcn.004136f1
add esp, 4
mov ecx, dword [esp + 0x74]
pop edi
pop esi
mov al, 1
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret