Function at 0x41f780
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 0x41f789
mov eax, dword [ebp - 4]
add esp, 0xfffff8fc
push ebx
push esi
push edi
mov dword [ebp - 0x88], edx
mov esi, eax
mov eax, 0x49ab8c
call fcn.0048dbf8
mov eax, 0x269
call fcn.004116e0
push eax
lea edx, [ebp - 0x308]
push edx
call fcn.00490628
add esp, 8
lea eax, [ebp - 0x308]
call fcn.00477974
xor edx, edx
mov eax, esi
call fcn.004042d4
test al, al
je 0x41f832
cmp byte [esi + 0x6e07], 0
jne 0x41f832
push 0
push 0
xor edx, edx
mov eax, esi
call fcn.00409808
mov eax, 0x26b
call fcn.004116e0
push eax
lea edx, [ebp - 0x308]
push edx
call fcn.00490628
add esp, 8
lea eax, [ebp - 0x308]
call fcn.00477974
xor eax, eax
mov edx, dword [ebp - 0x84]
mov dword fs:[0], edx
jmp 0x42040c
mov word [ebp - 0x74], 8
lea eax, [ebp - 0x10]
mov edx, esi
call fcn.0040e518
inc dword [ebp - 0x68]
mov edx, 0x49ac00
mov word [ebp - 0x74], 0x14
mov eax, esi
call fcn.00404fb8
test eax, eax
je 0x41f8e1
mov word [ebp - 0x74], 0x20
lea eax, [ebp - 0x50]
xor edx, edx
call fcn.00410c38
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.00410d38
lea edx, [ebp - 0xa0]
lea eax, [ebp - 0x50]
mov ecx, 8
call fcn.00410e18
lea edx, [ebp - 0x8c]
lea eax, [ebp - 0x50]
call fcn.00410d9c
lea edx, [ebp - 0x94]
lea eax, [ebp - 0x50]
call fcn.00410dd4
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 0x41fc49
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 0x41f941
mov cx, word [esi + 0x6e12]
cmp cx, word [esi + 0x6130]
jne 0x41f941
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 0x41fc49
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 0x41fbdf
xor edi, edi
jmp 0x41fbb8
lea ebx, [ebp - 0x2308]
add ebx, edi
mov word [ebp - 0x74], 0x14
cmp byte [ebx + 2], 0x7a
jne 0x41faf0
push 8
push str.Protect
lea eax, [ebx + 0x22]
push eax
call fcn.0048d8c0
add esp, 0xc
test eax, eax
jne 0x41faf0
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.0040fe58
and eax, 0xffff
movzx edx, word [ebp - 0xae]
cmp eax, edx
jne 0x41fbb7
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 0x41fbc9
cmp byte [ebx + 2], 0x78
jne 0x41fbb7
push 8
push str.Protect_
lea ecx, [ebx + 0x12]
push ecx
call fcn.0048d8c0
add esp, 0xc
test eax, eax
jne 0x41fbb7
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.0040fe58
and eax, 0xffff
cmp eax, dword [ebp - 0xbc]
jne 0x41fbb7
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 0x41fbc9
inc edi
mov ecx, dword [ebp - 0xac]
add ecx, 0xffffffce
cmp edi, ecx
jl 0x41f9b0
add dword [ebp - 0xa8], 0x1fce
adc dword [ebp - 0xa4], 0
jmp 0x41f969
cmp dword [esi + 0x6df4], 0
jne 0x41fc49
cmp dword [esi + 0x6df0], 0
jne 0x41fc49
push 0
push 0
xor edx, edx
mov eax, esi
call fcn.00409808
mov eax, 0x26b
call fcn.004116e0
push eax
lea edx, [ebp - 0x308]
push edx
call fcn.00490628
add esp, 8
lea eax, [ebp - 0x308]
call fcn.00477974
xor eax, eax
mov edx, 2
push eax
lea eax, [ebp - 0x10]
dec dword [ebp - 0x68]
call fcn.0040e584
pop eax
mov edx, dword [ebp - 0x84]
mov dword fs:[0], edx
jmp 0x42040c
mov eax, 0x26a
call fcn.004116e0
push eax
lea edx, [ebp - 0x308]
push edx
call fcn.00490628
add esp, 8
lea eax, [ebp - 0x308]
call fcn.00477974
push 0
push 0
push 0
push 0
or edx, 0xffffffff
mov eax, esi
call fcn.00420ab1
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 0x41fcce
mov edx, 0x36
jmp 0x41fcd3
mov edx, 0x1a
mov dword [ebp - 0xd8], edx
cmp byte [esi + 0x6e08], 0
je 0x41fcf7
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.00421bd0
inc dword [ebp - 0x68]
mov word [ebp - 0x74], 0x14
mov word [ebp - 0x74], 0x44
lea eax, [ebp - 0x28]
call fcn.0040eec0
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.00420413
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.0048d5d8
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 0x41febd
call fcn.0040f348
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.00420ab1
mov ecx, dword [ebp - 0xe4]
cmp ecx, dword [ebp - 0x18]
jge 0x41fe60
mov eax, esi
call fcn.004098c0
mov ecx, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0xe4]
cmp edx, dword [ecx + ebx*8 + 4]
jne 0x41fe24
cmp eax, dword [ecx + ebx*8]
jb 0x41fe60
jmp 0x41fe26
jl 0x41fe60
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.00420a3f
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 0x41fe8f
inc dword [ebp - 0xd0]
mov eax, dword [ebp - 0xd0]
cmp eax, dword [ebp - 0x8c]
jb 0x41febd
xor edx, edx
mov dword [ebp - 0xd0], edx
cmp dword [ebp - 0xc0], 0
jne 0x41fed5
cmp dword [ebp - 0xc4], 0
ja 0x41fdc5
jmp 0x41fedb
jg 0x41fdc5
push 0
push 0x64
push 0
push 0x64
mov edx, 1
mov eax, esi
call fcn.00420ab1
push 0
push 2
mov eax, dword [ebp - 0x94]
mov edx, dword [ebp - 0x90]
call fcn.00491bd0
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 0x41ff69
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 0x41ff51
inc dword [ebp - 0xe8]
mov eax, dword [ebp - 0xe8]
cmp eax, dword [ebp - 0x8c]
jb 0x41ff2b
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 0x420354
call fcn.0040f348
mov edx, dword [ebp - 0xe4]
cmp edx, dword [ebp - 0x18]
jge 0x420048
mov eax, esi
call fcn.004098c0
mov ecx, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0xe4]
cmp edx, dword [ecx + ebx*8 + 4]
jne 0x42000c
cmp eax, dword [ecx + ebx*8]
jb 0x420048
jmp 0x42000e
jl 0x420048
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.00420a3f
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.0040fe58
mov ebx, eax
and ebx, 0xffff
mov word [ebp - 0x74], 0x5c
lea eax, [ebp - 0x60]
mov edx, esi
call fcn.0040e518
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.0040e584
mov word [ebp - 0x74], 0x14
cmp ebx, dword [ebp - 0x100]
je 0x420332
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.004116e0
push eax
lea edx, [ebp - 0x308]
push edx
call fcn.00490628
add esp, 0x14
lea eax, [ebp - 0x308]
call fcn.00477974
push pe_nt_image_headers32
lea edx, [ebp - 0x2508]
push edx
lea ecx, [ebp - 0x2708]
push ecx
call fcn.0048d568
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 0x4201a0
lea edx, [ebp - 0x2508]
mov ecx, pe_nt_image_headers32
or eax, 0xffffffff
call fcn.0040fe58
mov ebx, eax
and ebx, 0xffff
cmp ebx, dword [ebp - 0x100]
jne 0x4201e7
mov byte [ebp - 0x105], 1
jmp 0x4202bf
push pe_nt_image_headers32
lea eax, [ebp - 0x2708]
push eax
lea edx, [ebp - 0x2508]
push edx
call fcn.0048d568
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.0040fe58
mov ebx, eax
and ebx, 0xffff
cmp ebx, dword [ebp - 0x100]
jne 0x420246
mov byte [ebp - 0x105], 1
jmp 0x42024f
inc edi
cmp edi, 0x200
jl 0x42020a
cmp byte [ebp - 0x105], 0
jne 0x4202bf
push pe_nt_image_headers32
lea eax, [ebp - 0x2708]
push eax
lea edx, [ebp - 0x2508]
push edx
call fcn.0048d568
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.0040fe58
mov ebx, eax
and ebx, 0xffff
cmp ebx, dword [ebp - 0x100]
jne 0x4202ba
mov byte [ebp - 0x105], 1
jmp 0x4202bf
dec edi
test edi, edi
jge 0x42027e
cmp byte [ebp - 0x105], 0
je 0x42031d
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.004116e0
call fcn.00477974
jmp 0x420332
mov eax, 0x26e
call fcn.004116e0
call fcn.00477974
inc dword [ebp - 0xf8]
inc dword [ebp - 0xf4]
inc dword [ebp - 0xd0]
mov edx, dword [ebp - 0xd0]
cmp edx, dword [ebp - 0x8c]
jb 0x420354
xor ecx, ecx
mov dword [ebp - 0xd0], ecx
cmp dword [ebp - 0xc0], 0
jne 0x42036c
cmp dword [ebp - 0xc4], 0
ja 0x41ffdf
jmp 0x420372
jg 0x41ffdf
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 0x4203b8
mov eax, 1
jmp 0x4203bd
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.0040e584
pop eax
mov edx, dword [ebp - 0x84]
mov dword fs:[0], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret