Function at 0x41f858
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 0x41f861
mov eax, dword [ebp - 4]
add esp, 0xfffff8fc
push ebx
push esi
push edi
mov dword [ebp - 0x88], edx
mov esi, eax
mov eax, 0x49ab10
call fcn.0048d8c4
mov eax, 0x269
call fcn.004117b8
push eax
lea edx, [ebp - 0x308]
push edx
call fcn.004902f4
add esp, 8
lea eax, [ebp - 0x308]
call fcn.004776c4
xor edx, edx
mov eax, esi
call fcn.004042d4
test al, al
je 0x41f90a
cmp byte [esi + 0x6e07], 0
jne 0x41f90a
push 0
push 0
xor edx, edx
mov eax, esi
call fcn.00409820
mov eax, 0x26b
call fcn.004117b8
push eax
lea edx, [ebp - 0x308]
push edx
call fcn.004902f4
add esp, 8
lea eax, [ebp - 0x308]
call fcn.004776c4
xor eax, eax
mov edx, dword [ebp - 0x84]
mov dword fs:[0], edx
jmp 0x4204e4
mov word [ebp - 0x74], 8
lea eax, [ebp - 0x10]
mov edx, esi
call fcn.0040e5f0
inc dword [ebp - 0x68]
mov edx, 0x49ab84
mov word [ebp - 0x74], 0x14
mov eax, esi
call fcn.00404fb8
test eax, eax
je 0x41f9b9
mov word [ebp - 0x74], 0x20
lea eax, [ebp - 0x50]
xor edx, edx
call fcn.00410d10
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.00410e10
lea edx, [ebp - 0xa0]
lea eax, [ebp - 0x50]
mov ecx, 8
call fcn.00410ef0
lea edx, [ebp - 0x8c]
lea eax, [ebp - 0x50]
call fcn.00410e74
lea edx, [ebp - 0x94]
lea eax, [ebp - 0x50]
call fcn.00410eac
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 0x41fd21
mov eax, dword [esi + 0x6e0c]
xor edx, edx
push edx
push eax
xor edx, edx
mov eax, esi
call fcn.00409820
mov edx, 0x78
mov eax, esi
call fcn.00404f68
test eax, eax
je 0x41fa19
mov cx, word [esi + 0x6e12]
cmp cx, word [esi + 0x6130]
jne 0x41fa19
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 0x41fd21
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.00409820
lea edx, [ebp - 0x2308]
mov ecx, 0x2000
mov eax, esi
call fcn.004096bc
mov dword [ebp - 0xac], eax
mov word [ebp - 0x74], 0x14
cmp dword [ebp - 0xac], 0
je 0x41fcb7
xor edi, edi
jmp 0x41fc90
lea ebx, [ebp - 0x2308]
add ebx, edi
mov word [ebp - 0x74], 0x14
cmp byte [ebx + 2], 0x7a
jne 0x41fbc8
push 8
push 0x49ab87
lea eax, [ebx + 0x22]
push eax
call fcn.0048d58c
add esp, 0xc
test eax, eax
jne 0x41fbc8
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.0040ff30
and eax, 0xffff
movzx edx, word [ebp - 0xae]
cmp eax, edx
jne 0x41fc8f
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 0x41fca1
cmp byte [ebx + 2], 0x78
jne 0x41fc8f
push 8
push 0x49ab90
lea ecx, [ebx + 0x12]
push ecx
call fcn.0048d58c
add esp, 0xc
test eax, eax
jne 0x41fc8f
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.0040ff30
and eax, 0xffff
cmp eax, dword [ebp - 0xbc]
jne 0x41fc8f
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 0x41fca1
inc edi
mov ecx, dword [ebp - 0xac]
add ecx, 0xffffffce
cmp edi, ecx
jl 0x41fa88
add dword [ebp - 0xa8], 0x1fce
adc dword [ebp - 0xa4], 0
jmp 0x41fa41
cmp dword [esi + 0x6df4], 0
jne 0x41fd21
cmp dword [esi + 0x6df0], 0
jne 0x41fd21
push 0
push 0
xor edx, edx
mov eax, esi
call fcn.00409820
mov eax, 0x26b
call fcn.004117b8
push eax
lea edx, [ebp - 0x308]
push edx
call fcn.004902f4
add esp, 8
lea eax, [ebp - 0x308]
call fcn.004776c4
xor eax, eax
mov edx, 2
push eax
lea eax, [ebp - 0x10]
dec dword [ebp - 0x68]
call fcn.0040e65c
pop eax
mov edx, dword [ebp - 0x84]
mov dword fs:[0], edx
jmp 0x4204e4
mov eax, 0x26a
call fcn.004117b8
push eax
lea edx, [ebp - 0x308]
push edx
call fcn.004902f4
add esp, 8
lea eax, [ebp - 0x308]
call fcn.004776c4
push 0
push 0
push 0
push 0
or edx, 0xffffffff
mov eax, esi
call fcn.00420b89
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 0x41fda6
mov edx, 0x36
jmp 0x41fdab
mov edx, 0x1a
mov dword [ebp - 0xd8], edx
cmp byte [esi + 0x6e08], 0
je 0x41fdcf
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.00421d7c
inc dword [ebp - 0x68]
mov word [ebp - 0x74], 0x14
mov word [ebp - 0x74], 0x44
lea eax, [ebp - 0x28]
call fcn.0040ef98
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.004204eb
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.0048d2a4
add esp, 0xc
xor edx, edx
mov eax, esi
push 0
push 0
call fcn.00409820
xor edx, edx
mov dword [ebp - 0xe4], edx
jmp 0x41ff95
call fcn.0040f420
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.00420b89
mov ecx, dword [ebp - 0xe4]
cmp ecx, dword [ebp - 0x18]
jge 0x41ff38
mov eax, esi
call fcn.004098d8
mov ecx, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0xe4]
cmp edx, dword [ecx + ebx*8 + 4]
jne 0x41fefc
cmp eax, dword [ecx + ebx*8]
jb 0x41ff38
jmp 0x41fefe
jl 0x41ff38
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.00409820
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.00420b17
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 0x41ff67
inc dword [ebp - 0xd0]
mov eax, dword [ebp - 0xd0]
cmp eax, dword [ebp - 0x8c]
jb 0x41ff95
xor edx, edx
mov dword [ebp - 0xd0], edx
cmp dword [ebp - 0xc0], 0
jne 0x41ffad
cmp dword [ebp - 0xc4], 0
ja 0x41fe9d
jmp 0x41ffb3
jg 0x41fe9d
push 0
push 0x64
push 0
push 0x64
mov edx, 1
mov eax, esi
call fcn.00420b89
push 0
push 2
mov eax, dword [ebp - 0x94]
mov edx, dword [ebp - 0x90]
call fcn.0049189c
add eax, dword [ebp - 0xe0]
adc edx, dword [ebp - 0xdc]
push edx
push eax
xor edx, edx
mov eax, esi
call fcn.00409820
xor ecx, ecx
mov dword [ebp - 0xe8], ecx
mov word [ebp - 0x74], 0x14
jmp 0x420041
lea edx, [ebp - 0x2508]
mov ecx, pe_nt_image_headers32
mov eax, esi
call fcn.004096bc
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 0x420029
inc dword [ebp - 0xe8]
mov eax, dword [ebp - 0xe8]
cmp eax, dword [ebp - 0x8c]
jb 0x420003
push 0
push 0
xor edx, edx
mov eax, esi
call fcn.00409820
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 0x42042c
call fcn.0040f420
mov edx, dword [ebp - 0xe4]
cmp edx, dword [ebp - 0x18]
jge 0x420120
mov eax, esi
call fcn.004098d8
mov ecx, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0xe4]
cmp edx, dword [ecx + ebx*8 + 4]
jne 0x4200e4
cmp eax, dword [ecx + ebx*8]
jb 0x420120
jmp 0x4200e6
jl 0x420120
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.00409820
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.00420b17
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.004094fc
lea edx, [ebp - 0x2508]
mov ecx, pe_nt_image_headers32
or eax, 0xffffffff
call fcn.0040ff30
mov ebx, eax
and ebx, 0xffff
mov word [ebp - 0x74], 0x5c
lea eax, [ebp - 0x60]
mov edx, esi
call fcn.0040e5f0
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.00409820
mov eax, esi
call fcn.00409974
mov edi, eax
mov eax, esi
and edi, 0xff
call fcn.00409974
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.0040e65c
mov word [ebp - 0x74], 0x14
cmp ebx, dword [ebp - 0x100]
je 0x42040a
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.004117b8
push eax
lea edx, [ebp - 0x308]
push edx
call fcn.004902f4
add esp, 0x14
lea eax, [ebp - 0x308]
call fcn.004776c4
push pe_nt_image_headers32
lea edx, [ebp - 0x2508]
push edx
lea ecx, [ebp - 0x2708]
push ecx
call fcn.0048d234
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 0x420278
lea edx, [ebp - 0x2508]
mov ecx, pe_nt_image_headers32
or eax, 0xffffffff
call fcn.0040ff30
mov ebx, eax
and ebx, 0xffff
cmp ebx, dword [ebp - 0x100]
jne 0x4202bf
mov byte [ebp - 0x105], 1
jmp 0x420397
push pe_nt_image_headers32
lea eax, [ebp - 0x2708]
push eax
lea edx, [ebp - 0x2508]
push edx
call fcn.0048d234
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.0040ff30
mov ebx, eax
and ebx, 0xffff
cmp ebx, dword [ebp - 0x100]
jne 0x42031e
mov byte [ebp - 0x105], 1
jmp 0x420327
inc edi
cmp edi, 0x200
jl 0x4202e2
cmp byte [ebp - 0x105], 0
jne 0x420397
push pe_nt_image_headers32
lea eax, [ebp - 0x2708]
push eax
lea edx, [ebp - 0x2508]
push edx
call fcn.0048d234
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.0040ff30
mov ebx, eax
and ebx, 0xffff
cmp ebx, dword [ebp - 0x100]
jne 0x420392
mov byte [ebp - 0x105], 1
jmp 0x420397
dec edi
test edi, edi
jge 0x420356
cmp byte [ebp - 0x105], 0
je 0x4203f5
mov eax, dword [ebp - 0x88]
call fcn.004098d8
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.00409820
lea edx, [ebp - 0x2508]
mov ecx, dword [ebp - 0xfc]
mov eax, dword [ebp - 0x88]
call fcn.004094fc
mov eax, 0x26d
call fcn.004117b8
call fcn.004776c4
jmp 0x42040a
mov eax, 0x26e
call fcn.004117b8
call fcn.004776c4
inc dword [ebp - 0xf8]
inc dword [ebp - 0xf4]
inc dword [ebp - 0xd0]
mov edx, dword [ebp - 0xd0]
cmp edx, dword [ebp - 0x8c]
jb 0x42042c
xor ecx, ecx
mov dword [ebp - 0xd0], ecx
cmp dword [ebp - 0xc0], 0
jne 0x420444
cmp dword [ebp - 0xc4], 0
ja 0x4200b7
jmp 0x42044a
jg 0x4200b7
push dword [ebp - 0xc8]
push dword [ebp - 0xcc]
xor edx, edx
mov eax, esi
call fcn.00409820
push 0x80000000
push 0
mov edx, dword [ebp - 0x88]
mov eax, esi
call fcn.00409b6c
push 0
push 0
xor edx, edx
mov eax, esi
call fcn.00409820
cmp dword [ebp - 0xf8], 0
je 0x420490
mov eax, 1
jmp 0x420495
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.0040e65c
pop eax
mov edx, dword [ebp - 0x84]
mov dword fs:[0], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret