Function at 0x41f790
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push eax
mov eax, 2
add esp, 0xfffff004
push eax
dec eax
jne 0x41f799
mov eax, dword [ebp - 4]
add esp, 0xfffff8fc
push ebx
push esi
push edi
mov dword [ebp - 0x88], edx
mov esi, eax
mov eax, 0x49abfc
call fcn.0048dd88
mov eax, 0x269
call fcn.004116e8
push eax
lea edx, [ebp - 0x308]
push edx
call fcn.004908b8
add esp, 8
lea eax, [ebp - 0x308]
call fcn.00477b04
xor edx, edx
mov eax, esi
call fcn.004042d4
test al, al
je 0x41f842
cmp byte [esi + 0x6e07], 0
jne 0x41f842
push 0
push 0
xor edx, edx
mov eax, esi
call fcn.00409808
mov eax, 0x26b
call fcn.004116e8
push eax
lea edx, [ebp - 0x308]
push edx
call fcn.004908b8
add esp, 8
lea eax, [ebp - 0x308]
call fcn.00477b04
xor eax, eax
mov edx, dword [ebp - 0x84]
mov dword fs:[0], edx
jmp 0x42041c
mov word [ebp - 0x74], 8
lea eax, [ebp - 0x10]
mov edx, esi
call fcn.0040e520
inc dword [ebp - 0x68]
mov edx, 0x49ac70
mov word [ebp - 0x74], 0x14
mov eax, esi
call fcn.00404fb8
test eax, eax
je 0x41f8f1
mov word [ebp - 0x74], 0x20
lea eax, [ebp - 0x50]
xor edx, edx
call fcn.00410c40
add dword [ebp - 0x68], 2
mov word [ebp - 0x74], 0x2c
lea eax, [ebp - 0x50]
mov ecx, dword [esi + 0x604c]
mov edx, dword [esi + 0x6048]
call fcn.00410d40
lea edx, [ebp - 0xa0]
lea eax, [ebp - 0x50]
mov ecx, 8
call fcn.00410e20
lea edx, [ebp - 0x8c]
lea eax, [ebp - 0x50]
call fcn.00410da4
lea edx, [ebp - 0x94]
lea eax, [ebp - 0x50]
call fcn.00410ddc
mov byte [ebp - 0x95], 1
dec dword [ebp - 0x68]
dec dword [ebp - 0x68]
lea eax, [ebp - 0x50]
mov edx, 2
call fcn.0040177c
mov word [ebp - 0x74], 0x14
jmp 0x41fc59
mov eax, dword [esi + 0x6e0c]
xor edx, edx
push edx
push eax
xor edx, edx
mov eax, esi
call fcn.00409808
mov edx, 0x78
mov eax, esi
call fcn.00404f68
test eax, eax
je 0x41f951
mov cx, word [esi + 0x6e12]
cmp cx, word [esi + 0x6130]
jne 0x41f951
movzx eax, word [esi + 0x6142]
mov dword [ebp - 0x8c], eax
mov eax, dword [esi + 0x6144]
xor edx, edx
mov dword [ebp - 0x94], eax
mov dword [ebp - 0x90], edx
mov byte [ebp - 0x95], 0
jmp 0x41fc59
mov dword [ebp - 0xa8], 0
mov dword [ebp - 0xa4], 0
mov dword [esi + 0x6df0], 0
mov dword [esi + 0x6df4], 0
push dword [ebp - 0xa4]
push dword [ebp - 0xa8]
xor edx, edx
mov eax, esi
call fcn.00409808
lea edx, [ebp - 0x2308]
mov ecx, 0x2000
mov eax, esi
call fcn.004096a4
mov dword [ebp - 0xac], eax
mov word [ebp - 0x74], 0x14
cmp dword [ebp - 0xac], 0
je 0x41fbef
xor edi, edi
jmp 0x41fbc8
lea ebx, [ebp - 0x2308]
add ebx, edi
mov word [ebp - 0x74], 0x14
cmp byte [ebx + 2], 0x7a
jne 0x41fb00
push 8
push str.Protect
lea eax, [ebx + 0x22]
push eax
call fcn.0048da50
add esp, 0xc
test eax, eax
jne 0x41fb00
xor ecx, ecx
xor edx, edx
mov cl, byte [ebx + 1]
mov dl, byte [ebx]
shl ecx, 8
add dx, cx
mov ecx, 0x34
not dx
and dx, 0xffff
or eax, 0xffffffff
mov word [ebp - 0xae], dx
lea edx, [ebx + 2]
call fcn.0040fe60
and eax, 0xffff
movzx edx, word [ebp - 0xae]
cmp eax, edx
jne 0x41fbc7
xor ecx, ecx
xor eax, eax
mov cl, byte [ebx + 0x2b]
mov al, byte [ebx + 0x2a]
shl ecx, 8
xor edx, edx
add eax, ecx
mov dl, byte [ebx + 0x2c]
xor ecx, ecx
mov cl, byte [ebx + 0x2d]
shl edx, 0x10
shl ecx, 0x18
add eax, edx
add eax, ecx
xor edx, edx
mov dword [ebp - 0x8c], eax
xor eax, eax
mov dl, byte [ebx + 0x2f]
mov al, byte [ebx + 0x2e]
shl edx, 8
xor ecx, ecx
add eax, edx
mov cl, byte [ebx + 0x30]
xor edx, edx
mov dl, byte [ebx + 0x31]
shl ecx, 0x10
shl edx, 0x18
add eax, ecx
add eax, edx
xor edx, edx
mov dword [ebp - 0x94], eax
mov dword [ebp - 0x90], edx
xor edx, edx
xor eax, eax
mov dl, byte [ebx + 0x33]
mov al, byte [ebx + 0x32]
shl edx, 8
xor ecx, ecx
add eax, edx
mov cl, byte [ebx + 0x34]
xor edx, edx
mov dl, byte [ebx + 0x35]
shl ecx, 0x10
shl edx, 0x18
add eax, ecx
add eax, edx
xor edx, edx
mov dword [ebp - 0xb8], eax
mov dword [ebp - 0xb4], edx
mov edx, dword [ebp - 0xb8]
xor eax, eax
add dword [ebp - 0x94], eax
adc dword [ebp - 0x90], edx
mov eax, edi
cdq
add eax, dword [ebp - 0xa8]
adc edx, dword [ebp - 0xa4]
mov dword [esi + 0x6df0], eax
mov dword [esi + 0x6df4], edx
mov byte [ebp - 0x95], 1
jmp 0x41fbd9
cmp byte [ebx + 2], 0x78
jne 0x41fbc7
push 8
push str.Protect_
lea ecx, [ebx + 0x12]
push ecx
call fcn.0048da50
add esp, 0xc
test eax, eax
jne 0x41fbc7
xor edx, edx
xor eax, eax
mov dl, byte [ebx + 1]
mov al, byte [ebx]
shl edx, 8
mov ecx, 0x18
add eax, edx
lea edx, [ebx + 2]
not eax
and eax, 0xffff
mov dword [ebp - 0xbc], eax
or eax, 0xffffffff
call fcn.0040fe60
and eax, 0xffff
cmp eax, dword [ebp - 0xbc]
jne 0x41fbc7
xor edx, edx
xor eax, eax
mov dl, byte [ebx + 0xd]
mov al, byte [ebx + 0xc]
shl edx, 8
xor ecx, ecx
add eax, edx
xor edx, edx
mov dword [ebp - 0x8c], eax
xor eax, eax
mov dl, byte [ebx + 0xf]
mov al, byte [ebx + 0xe]
shl edx, 8
mov cl, byte [ebx + 0x10]
add eax, edx
xor edx, edx
mov dl, byte [ebx + 0x11]
shl ecx, 0x10
shl edx, 0x18
add eax, ecx
add eax, edx
xor edx, edx
mov dword [ebp - 0x94], eax
mov dword [ebp - 0x90], edx
mov eax, edi
cdq
add eax, dword [ebp - 0xa8]
adc edx, dword [ebp - 0xa4]
mov dword [esi + 0x6df0], eax
mov dword [esi + 0x6df4], edx
mov byte [ebp - 0x95], 0
jmp 0x41fbd9
inc edi
mov ecx, dword [ebp - 0xac]
add ecx, 0xffffffce
cmp edi, ecx
jl 0x41f9c0
add dword [ebp - 0xa8], 0x1fce
adc dword [ebp - 0xa4], 0
jmp 0x41f979
cmp dword [esi + 0x6df4], 0
jne 0x41fc59
cmp dword [esi + 0x6df0], 0
jne 0x41fc59
push 0
push 0
xor edx, edx
mov eax, esi
call fcn.00409808
mov eax, 0x26b
call fcn.004116e8
push eax
lea edx, [ebp - 0x308]
push edx
call fcn.004908b8
add esp, 8
lea eax, [ebp - 0x308]
call fcn.00477b04
xor eax, eax
mov edx, 2
push eax
lea eax, [ebp - 0x10]
dec dword [ebp - 0x68]
call fcn.0040e58c
pop eax
mov edx, dword [ebp - 0x84]
mov dword fs:[0], edx
jmp 0x42041c
mov eax, 0x26a
call fcn.004116e8
push eax
lea edx, [ebp - 0x308]
push edx
call fcn.004908b8
add esp, 8
lea eax, [ebp - 0x308]
call fcn.00477b04
push 0
push 0
push 0
push 0
or edx, 0xffffffff
mov eax, esi
call fcn.00420ac1
mov edx, dword [esi + 0x6df0]
xor eax, eax
mov dword [ebp - 0xc4], edx
mov edx, dword [esi + 0x6df4]
mov dword [ebp - 0xc0], edx
mov word [ebp - 0x74], 0x14
mov ecx, dword [esi + 0x6df0]
mov dword [ebp - 0xcc], ecx
mov ecx, dword [esi + 0x6df4]
mov dword [ebp - 0xc8], ecx
mov dword [ebp - 0xd0], eax
cmp byte [ebp - 0x95], 0
je 0x41fcde
mov edx, 0x36
jmp 0x41fce3
mov edx, 0x1a
mov dword [ebp - 0xd8], edx
cmp byte [esi + 0x6e08], 0
je 0x41fd07
mov eax, dword [ebp - 0xd8]
not eax
inc eax
and eax, 0xf
add eax, 8
add dword [ebp - 0xd8], eax
mov eax, dword [ebp - 0xd8]
cdq
add eax, dword [ebp - 0xcc]
adc edx, dword [ebp - 0xc8]
mov dword [ebp - 0xe0], eax
mov dword [ebp - 0xdc], edx
mov word [ebp - 0x74], 0x38
lea eax, [ebp - 0x1c]
call fcn.00421be0
inc dword [ebp - 0x68]
mov word [ebp - 0x74], 0x14
mov word [ebp - 0x74], 0x44
lea eax, [ebp - 0x28]
call fcn.0040eec8
inc dword [ebp - 0x68]
mov word [ebp - 0x74], 0x14
push dword [ebp - 0xdc]
push dword [ebp - 0xe0]
push dword [ebp - 0x8c]
push dword [ebp - 0x90]
push dword [ebp - 0x94]
push dword [ebp - 0xc0]
push dword [ebp - 0xc4]
lea ecx, [ebp - 0x28]
lea edx, [ebp - 0x1c]
mov eax, esi
call fcn.00420423
mov word [ebp - 0x74], 0x50
mov edx, dword [ebp - 0x8c]
lea eax, [ebp - 0x34]
shl edx, 9
call fcn.00401a54
inc dword [ebp - 0x68]
mov word [ebp - 0x74], 0x14
push dword [ebp - 0x30]
push 0
push dword [ebp - 0x34]
call fcn.0048d768
add esp, 0xc
xor edx, edx
mov eax, esi
push 0
push 0
call fcn.00409808
xor edx, edx
mov dword [ebp - 0xe4], edx
jmp 0x41fecd
call fcn.0040f350
mov eax, dword [ebp - 0xcc]
mov edx, dword [ebp - 0xc8]
sub eax, dword [ebp - 0xc4]
sbb edx, dword [ebp - 0xc0]
push edx
push eax
push dword [ebp - 0xc8]
push dword [ebp - 0xcc]
mov edx, 1
mov eax, esi
call fcn.00420ac1
mov ecx, dword [ebp - 0xe4]
cmp ecx, dword [ebp - 0x18]
jge 0x41fe70
mov eax, esi
call fcn.004098c0
mov ecx, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0xe4]
cmp edx, dword [ecx + ebx*8 + 4]
jne 0x41fe34
cmp eax, dword [ecx + ebx*8]
jb 0x41fe70
jmp 0x41fe36
jl 0x41fe70
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0xe4]
mov eax, dword [eax + edx*4]
cdq
push edx
push eax
mov edx, 1
mov eax, esi
call fcn.00409808
mov ecx, dword [ebp - 0x28]
mov eax, dword [ebp - 0xe4]
mov eax, dword [ecx + eax*4]
cdq
sub dword [ebp - 0xc4], eax
sbb dword [ebp - 0xc0], edx
inc dword [ebp - 0xe4]
lea ecx, [ebp - 0xc4]
push ecx
push 1
lea edx, [ebp - 0x2508]
mov ecx, pe_nt_image_headers32
mov eax, esi
call fcn.00420a4f
mov edx, dword [ebp - 0xd0]
shl edx, 9
add edx, dword [ebp - 0x34]
mov word [ebp - 0x74], 0x14
xor eax, eax
mov cl, byte [ebp + eax - 0x2508]
xor byte [edx + eax], cl
inc eax
cmp eax, 0x200
jl 0x41fe9f
inc dword [ebp - 0xd0]
mov eax, dword [ebp - 0xd0]
cmp eax, dword [ebp - 0x8c]
jb 0x41fecd
xor edx, edx
mov dword [ebp - 0xd0], edx
cmp dword [ebp - 0xc0], 0
jne 0x41fee5
cmp dword [ebp - 0xc4], 0
ja 0x41fdd5
jmp 0x41feeb
jg 0x41fdd5
push 0
push 0x64
push 0
push 0x64
mov edx, 1
mov eax, esi
call fcn.00420ac1
push 0
push 2
mov eax, dword [ebp - 0x94]
mov edx, dword [ebp - 0x90]
call fcn.00491e60
add eax, dword [ebp - 0xe0]
adc edx, dword [ebp - 0xdc]
push edx
push eax
xor edx, edx
mov eax, esi
call fcn.00409808
xor ecx, ecx
mov dword [ebp - 0xe8], ecx
mov word [ebp - 0x74], 0x14
jmp 0x41ff79
lea edx, [ebp - 0x2508]
mov ecx, pe_nt_image_headers32
mov eax, esi
call fcn.004096a4
mov edx, dword [ebp - 0xe8]
shl edx, 9
add edx, dword [ebp - 0x34]
mov word [ebp - 0x74], 0x14
xor eax, eax
mov cl, byte [ebp + eax - 0x2508]
xor byte [edx + eax], cl
inc eax
cmp eax, 0x200
jl 0x41ff61
inc dword [ebp - 0xe8]
mov eax, dword [ebp - 0xe8]
cmp eax, dword [ebp - 0x8c]
jb 0x41ff3b
push 0
push 0
xor edx, edx
mov eax, esi
call fcn.00409808
mov edx, dword [ebp - 0xe0]
xor eax, eax
mov dword [ebp - 0xf0], edx
mov edx, dword [ebp - 0xdc]
mov dword [ebp - 0xec], edx
xor edx, edx
mov word [ebp - 0x74], 0x14
mov ecx, dword [ebp - 0xcc]
mov dword [ebp - 0xc4], ecx
mov ecx, dword [ebp - 0xc8]
mov dword [ebp - 0xc0], ecx
mov dword [ebp - 0xf4], eax
xor ecx, ecx
mov dword [ebp - 0xf8], edx
mov dword [ebp - 0xd0], ecx
xor eax, eax
mov dword [ebp - 0xe4], eax
jmp 0x420364
call fcn.0040f350
mov edx, dword [ebp - 0xe4]
cmp edx, dword [ebp - 0x18]
jge 0x420058
mov eax, esi
call fcn.004098c0
mov ecx, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0xe4]
cmp edx, dword [ecx + ebx*8 + 4]
jne 0x42001c
cmp eax, dword [ecx + ebx*8]
jb 0x420058
jmp 0x42001e
jl 0x420058
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0xe4]
mov eax, dword [eax + edx*4]
cdq
push edx
push eax
mov edx, 1
mov eax, esi
call fcn.00409808
mov ecx, dword [ebp - 0x28]
mov eax, dword [ebp - 0xe4]
mov eax, dword [ecx + eax*4]
cdq
sub dword [ebp - 0xc4], eax
sbb dword [ebp - 0xc0], edx
inc dword [ebp - 0xe4]
lea ecx, [ebp - 0xc4]
push ecx
push 1
lea edx, [ebp - 0x2508]
mov ecx, pe_nt_image_headers32
mov eax, esi
call fcn.00420a4f
mov dword [ebp - 0xfc], eax
mov word [ebp - 0x74], 0x14
lea edx, [ebp - 0x2508]
mov ecx, dword [ebp - 0xfc]
mov eax, dword [ebp - 0x88]
call fcn.004094e4
lea edx, [ebp - 0x2508]
mov ecx, pe_nt_image_headers32
or eax, 0xffffffff
call fcn.0040fe60
mov ebx, eax
and ebx, 0xffff
mov word [ebp - 0x74], 0x5c
lea eax, [ebp - 0x60]
mov edx, esi
call fcn.0040e520
inc dword [ebp - 0x68]
xor edx, edx
mov word [ebp - 0x74], 0x68
push dword [ebp - 0xec]
push dword [ebp - 0xf0]
mov eax, esi
call fcn.00409808
mov eax, esi
call fcn.0040995c
mov edi, eax
mov eax, esi
and edi, 0xff
call fcn.0040995c
xor edx, edx
mov dl, al
lea eax, [ebp - 0x60]
shl edx, 8
add edi, edx
mov edx, 2
mov dword [ebp - 0x100], edi
add dword [ebp - 0xf0], 2
adc dword [ebp - 0xec], 0
dec dword [ebp - 0x68]
call fcn.0040e58c
mov word [ebp - 0x74], 0x14
cmp ebx, dword [ebp - 0x100]
je 0x420342
mov ecx, dword [ebp - 0xf4]
inc ecx
shl ecx, 9
push ecx
mov eax, dword [ebp - 0xf4]
shl eax, 9
push eax
push dword [ebp - 0xf4]
mov eax, 0x26c
call fcn.004116e8
push eax
lea edx, [ebp - 0x308]
push edx
call fcn.004908b8
add esp, 0x14
lea eax, [ebp - 0x308]
call fcn.00477b04
push pe_nt_image_headers32
lea edx, [ebp - 0x2508]
push edx
lea ecx, [ebp - 0x2708]
push ecx
call fcn.0048d6f8
add esp, 0xc
mov eax, dword [ebp - 0xd0]
shl eax, 9
add eax, dword [ebp - 0x34]
mov dword [ebp - 0x104], eax
mov word [ebp - 0x74], 0x14
mov byte [ebp - 0x105], 0
xor eax, eax
mov edx, dword [ebp - 0x104]
mov cl, byte [edx + eax]
xor byte [ebp + eax - 0x2508], cl
inc eax
cmp eax, 0x200
jl 0x4201b0
lea edx, [ebp - 0x2508]
mov ecx, pe_nt_image_headers32
or eax, 0xffffffff
call fcn.0040fe60
mov ebx, eax
and ebx, 0xffff
cmp ebx, dword [ebp - 0x100]
jne 0x4201f7
mov byte [ebp - 0x105], 1
jmp 0x4202cf
push pe_nt_image_headers32
lea eax, [ebp - 0x2708]
push eax
lea edx, [ebp - 0x2508]
push edx
call fcn.0048d6f8
add esp, 0xc
mov word [ebp - 0x74], 0x14
xor edi, edi
mov eax, dword [ebp - 0x104]
mov ecx, pe_nt_image_headers32
mov dl, byte [eax + edi]
xor byte [ebp + edi - 0x2508], dl
lea edx, [ebp - 0x2508]
or eax, 0xffffffff
call fcn.0040fe60
mov ebx, eax
and ebx, 0xffff
cmp ebx, dword [ebp - 0x100]
jne 0x420256
mov byte [ebp - 0x105], 1
jmp 0x42025f
inc edi
cmp edi, 0x200
jl 0x42021a
cmp byte [ebp - 0x105], 0
jne 0x4202cf
push pe_nt_image_headers32
lea eax, [ebp - 0x2708]
push eax
lea edx, [ebp - 0x2508]
push edx
call fcn.0048d6f8
add esp, 0xc
mov word [ebp - 0x74], 0x14
mov edi, 0x1ff
mov eax, dword [ebp - 0x104]
mov ecx, pe_nt_image_headers32
mov dl, byte [eax + edi]
xor byte [ebp + edi - 0x2508], dl
lea edx, [ebp - 0x2508]
or eax, 0xffffffff
call fcn.0040fe60
mov ebx, eax
and ebx, 0xffff
cmp ebx, dword [ebp - 0x100]
jne 0x4202ca
mov byte [ebp - 0x105], 1
jmp 0x4202cf
dec edi
test edi, edi
jge 0x42028e
cmp byte [ebp - 0x105], 0
je 0x42032d
mov eax, dword [ebp - 0x88]
call fcn.004098c0
push edx
push eax
mov eax, dword [ebp - 0xfc]
xor edx, edx
sub dword [esp], eax
sbb dword [esp + 4], edx
pop eax
pop edx
push edx
push eax
xor edx, edx
mov eax, dword [ebp - 0x88]
call fcn.00409808
lea edx, [ebp - 0x2508]
mov ecx, dword [ebp - 0xfc]
mov eax, dword [ebp - 0x88]
call fcn.004094e4
mov eax, 0x26d
call fcn.004116e8
call fcn.00477b04
jmp 0x420342
mov eax, 0x26e
call fcn.004116e8
call fcn.00477b04
inc dword [ebp - 0xf8]
inc dword [ebp - 0xf4]
inc dword [ebp - 0xd0]
mov edx, dword [ebp - 0xd0]
cmp edx, dword [ebp - 0x8c]
jb 0x420364
xor ecx, ecx
mov dword [ebp - 0xd0], ecx
cmp dword [ebp - 0xc0], 0
jne 0x42037c
cmp dword [ebp - 0xc4], 0
ja 0x41ffef
jmp 0x420382
jg 0x41ffef
push dword [ebp - 0xc8]
push dword [ebp - 0xcc]
xor edx, edx
mov eax, esi
call fcn.00409808
push 0x80000000
push 0
mov edx, dword [ebp - 0x88]
mov eax, esi
call fcn.00409b54
push 0
push 0
xor edx, edx
mov eax, esi
call fcn.00409808
cmp dword [ebp - 0xf8], 0
je 0x4203c8
mov eax, 1
jmp 0x4203cd
mov eax, 2
push eax
dec dword [ebp - 0x68]
lea eax, [ebp - 0x34]
mov edx, 2
call fcn.00401acc
dec dword [ebp - 0x68]
lea eax, [ebp - 0x28]
mov edx, 2
call fcn.00404dcc
dec dword [ebp - 0x68]
lea eax, [ebp - 0x1c]
mov edx, 2
call fcn.00404f3c
dec dword [ebp - 0x68]
lea eax, [ebp - 0x10]
mov edx, 2
call fcn.0040e58c
pop eax
mov edx, dword [ebp - 0x84]
mov dword fs:[0], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret