Function at 0x409a40
Capabilities:
Authenticate hmac
Encode data using xor
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xd4
push ebx
mov ebx, dword [ebp + 0xc]
mov ecx, dword [ebx + 4]
push esi
push edi
mov edi, eax
mov eax, dword [edi]
mov edx, dword [ecx + eax*4]
mov eax, dword [edx]
mov esi, dword [eax]
push esi
call fcn.004112d5
add esp, 4
mov dword [esp + 0x34], eax
add eax, 1
je 0x42cec9
add eax, 7
shr eax, 3
add eax, eax
add eax, eax
add eax, eax
xor ecx, ecx
mov dword [esp + 0x38], eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0041171a
mov ecx, dword [esp + 0x38]
add esp, 4
lea edx, [ecx + ecx + 2]
push edx
push esi
push eax
mov dword [esp + 0x3c], eax
call fcn.00410f70
add esp, 0xc
push 4
call fcn.0041171a
add esp, 4
test eax, eax
je 0x42ced3
mov dword [eax], 1
mov esi, dword [ebp + 8]
cmp dword [esi + 0x140], 0
mov dword [esp + 0x3c], eax
je 0x42cfb5
cmp dword [eax], 1
jg 0x42ceda
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x30]
push eax
push ecx
call dword [0x482640]
mov eax, dword [esi + 0x13c]
test eax, eax
jne 0x42cf44
mov edx, dword [ebp + 8]
mov esi, dword [edx + 0x134]
test esi, esi
je 0x42cfb5
mov dword [esp + 0x1c], esi
mov edi, edi
mov edx, dword [esi + 4]
cmp edx, dword [esp + 0x34]
jne 0x40aa47
test edx, edx
jbe 0x409b5b
mov ecx, dword [esp + 0x30]
mov eax, dword [esi]
jmp 0x409b40
mov si, word [eax]
cmp si, word [ecx]
jne 0x40aa43
add eax, 2
add ecx, 2
sub edx, 1
jne 0x409b40
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x3c]
add dword [eax], 0xffffffff
jne 0x409b7e
mov eax, dword [esp + 0x30]
push eax
call fcn.004112ef
mov ecx, dword [esp + 0x40]
add esp, 4
push ecx
call fcn.004112ef
add esp, 4
mov eax, esi
test eax, eax
je 0x42cfbe
mov edx, dword [eax + 0x14]
mov ecx, dword [eax + 0x18]
mov dword [esp + 0x74], edx
mov edx, dword [eax + 0x10]
mov eax, dword [edi]
mov dword [esp + 0x44], ecx
mov dword [esp + 0x7c], edx
mov edx, dword [ebx + 4]
mov ecx, dword [edx + eax*4]
movsx edx, word [ecx + 0xa]
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 0x148]
inc eax
mov dword [edi], eax
mov esi, dword [ebx + 4]
mov dword [esp + 0xdc], ecx
xor ecx, ecx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x28], 1
mov dword [esp + 0x2c], ecx
mov esi, dword [esi + eax*4]
cmp word [esi + 8], 0x47
mov dword [esp + 0x30], 0x487630
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x64], 0x48af14
mov dword [esp + 0x68], ecx
mov dword [esp + 0x6c], ecx
mov dword [esp + 0x70], ecx
jne 0x42cf38
inc eax
mov dword [esp + 0x84], edx
mov edx, eax
mov dword [esp + 0x18], ecx
xor esi, esi
mov dword [esp + 0x58], edx
mov dword [edi], eax
mov ecx, dword [ebx + 4]
mov ecx, dword [ecx + eax*4]
movsx ecx, word [ecx + 8]
cmp ecx, 0x47
jge 0x409c2f
inc eax
jmp 0x409c1b
sub ecx, 0x47
je 0x42d01e
sub ecx, 1
jne 0x42cff5
test esi, esi
jne 0x42d017
mov dword [esp + 0x14], eax
inc eax
mov dword [edi], eax
mov eax, dword [esp + 0x7c]
cmp eax, dword [0x4a8e90]
jg 0x42d024
cmp eax, ecx
jle 0x42d024
shl eax, 4
add eax, dword [0x4a8ec4]
mov dword [esp + 0x60], eax
cmp dword [esp + 0x74], ecx
mov dword [esp + 0x5c], ecx
jle 0x409e4a
mov dword [esp + 0x10], 3
mov dword [esp + 0x80], ecx
cmp edx, dword [esp + 0x14]
jae 0x409e4a
mov ecx, dword [esp + 0x60]
mov eax, dword [ecx + 4]
mov ecx, dword [esp + 0x10]
inc dword [esp + 0x5c]
lea eax, [eax + ecx*4]
mov ecx, dword [eax]
xor edi, edi
xor bl, bl
cmp word [ecx + 8], di
je 0x42d02d
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 4]
mov edx, dword [ecx + edx*4]
cmp word [edx + 8], 0x33
je 0x409cd0
xor bl, bl
mov esi, dword [esp + 0x6c]
mov eax, dword [esp + 0x70]
cmp esi, eax
je 0x40aa5b
push 1
call fcn.0041171a
add esp, 4
test eax, eax
je 0x42d065
mov byte [eax], bl
mov edx, dword [esp + 0x68]
mov dword [edx + esi*4], eax
inc esi
mov dword [esp + 0x6c], esi
test bl, bl
jne 0x42d06c
mov eax, dword [esp + 0x2c]
test eax, eax
jne 0x42d176
mov eax, dword [esp + 0x28]
cmp eax, 8
je 0x42d189
cmp eax, 0xa
je 0x42d1ae
cmp eax, 5
je 0x42d1c5
cmp eax, 0xb
je 0x42d1d3
cmp eax, 0xc
je 0x42d1f5
mov esi, dword [esp + 0x38]
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x28], 1
mov dword [esp + 0x20], 0
cmp esi, eax
je 0x40aab8
mov edi, dword [esp + 0x34]
push 0x10
call fcn.0041171a
add esp, 4
test eax, eax
je 0x42d3db
mov ebx, eax
mov eax, dword [esp + 0x28]
mov dword [ebx + 8], eax
mov dword [ebx + 0xc], 0
cmp eax, 1
jne 0x42d20c
mov edx, dword [esp + 0x20]
mov dword [ebx], edx
mov eax, ebx
mov ebx, dword [esp + 0x14]
mov ecx, dword [ebp + 0xc]
mov dword [edi + esi*4], eax
inc esi
push ebx
mov dword [esp + 0x3c], esi
mov esi, dword [edi + esi*4 - 4]
push esi
lea eax, [esp + 0x60]
push eax
push ecx
mov ecx, dword [ebp + 8]
call fcn.0040ab50
test eax, eax
jne 0x42e5d7
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x60]
mov ecx, dword [edx + 4]
mov edx, dword [ecx + eax*4 + 4]
inc eax
cmp word [edx + 8], 0x41
mov dword [esp + 0x10], eax
je 0x42d3e2
mov edx, dword [esp + 0x58]
cmp edx, ebx
je 0x409e4a
mov esi, dword [ebp + 0xc]
mov eax, dword [esi + 4]
mov eax, dword [eax + edx*4]
mov ecx, 0x40
cmp word [eax + 8], cx
jne 0x42d431
lea eax, [edx + 1]
cmp eax, dword [esp + 0x14]
je 0x42d431
mov esi, dword [esp + 0x10]
mov edx, eax
mov eax, dword [esp + 0x60]
mov dword [esp + 0x58], edx
mov eax, dword [eax + 4]
mov eax, dword [eax + esi*4]
cmp word [eax + 8], cx
jne 0x409e31
inc dword [esp + 0x10]
mov eax, dword [esp + 0x80]
inc eax
cmp eax, dword [esp + 0x74]
mov dword [esp + 0x80], eax
jl 0x409c92
mov ebx, dword [esp + 0x5c]
cmp ebx, dword [esp + 0x44]
jl 0x42e5c4
cmp ebx, dword [esp + 0x74]
jg 0x42e5c4
cmp edx, dword [esp + 0x14]
jne 0x42e5c4
mov eax, dword [esp + 0x7c]
xor esi, esi
xor ecx, ecx
cmp eax, esi
mov dword [esp + 0x10], 3
mov dword [esp + 0x1c], esi
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], eax
jl 0x42d443
cmp byte [0x4a7ce5], 0
jne 0x42d44c
push 0xc
call fcn.0041171a
add esp, 4
cmp eax, esi
je 0x42d4ef
mov edi, eax
mov dword [edi], esi
mov edx, dword [esp + 0x50]
mov dword [edi + 4], edx
cmp dword [esp + 0x50], esi
jl 0x42d46d
mov eax, dword [esp + 0x4c]
cmp eax, esi
jne 0x42d475
mov dword [edi], esi
mov ecx, dword [0x4a7ce0]
mov dword [edi + 8], ecx
mov dword [0x4a7ce0], edi
mov eax, dword [esp + 0x4c]
mov edx, 1
add dword [0x4a7cdc], edx
cmp eax, esi
jne 0x42d4f6
cmp dword [esp + 0x74], edx
jl 0x40a3ab
mov dword [esp + 0x80], edx
lea esp, [esp]
add al, 0x3b
inc esp
and al, 0x74
dec byte [ebx - 0xb7076e9]
add byte [eax], al
add byte [ebx + 0x7c800442], cl
cmp byte [0x38448d00], cl
add al, 0xf
test dword [ebx + 0x37], ecx
add al, byte [eax]
out 0x3a, al
add al, byte [eax]
mov esi, dword [esp + 0x1c]
mov esi, dword [esi + 0x20]
mov dword [esp + 0x1c], esi
test esi, esi
jne 0x409b20
jmp 0x42cfb5
add eax, eax
cmp eax, 4
jae 0x40aa67
mov eax, 4
xor ecx, ecx
mov dword [esp + 0x70], eax
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0041171a
mov edx, dword [esp + 0x6c]
add esp, 4
lea ecx, [esi*4]
push ecx
push edx
push eax
mov dword [esp + 0x58], eax
call fcn.00410f70
mov eax, dword [esp + 0x74]
add esp, 0xc
push eax
call fcn.004112ef
mov ecx, dword [esp + 0x50]
add esp, 4
mov dword [esp + 0x68], ecx
jmp 0x409ce0
add eax, eax
cmp eax, 4
jae 0x40aac4
mov eax, 4
xor ecx, ecx
mov dword [esp + 0x3c], eax
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0041171a
mov ebx, dword [esp + 0x38]
mov edi, eax
add esp, 4
lea eax, [esi*4]
push eax
push ebx
push edi
call fcn.00410f70
add esp, 0xc
push ebx
call fcn.004112ef
add esp, 4
mov dword [esp + 0x34], edi
jmp 0x409d65
inc edx
add al, byte [eax]
and al, 0x24
or al, 0x89
jle 0x40d93e
int3
call 0x40ec2d
lea ecx, [ebx - 0x3c8a1723]
ret
mov al, bl
jmp 0xe85ad67b
call 0x450792fb
jmp 0x4c44c3d3
push 0x63
invalid
mov dword [ecx], eax
call 0x30abcd55
xor al, byte [ecx*4 - 0x173974cc]
inc esp
and al, 0x38
add esp, 0xfffffffe
add byte [eax], dh
xor dl, byte [eax]
mov dword [esi], edi
push esi
call 0xe9430fab
mov dword [edx + ecx*2 + 0x3c], edi
mov esi, dword [ebp + 8]
or dword [ebp + 0x6a], 0
mov bl, 0xcb
add dword [edx + edx*2 - 0x18], ecx
mov dword [esi - 0x1616cd00], 0xf00168e
invalid
cmp al, 0x56
xor byte [esp + ebx], ah
je 0x42cfce
or al, 0x2a
int1
std
cmp dh, bh
dec dword [ebp + 0x33000e8d]
push edx
call 0x4a5f1922
adc eax, 0xe95c248c
pavgb mm1, qword [eax]
mov dword [0x308e00], eax
add byte [eax + ebp*8 + 0x40034bbf], dl
mov dword [edx + 0x7a], ebp
je 0x42d060
dec esp
and al, 0x5c
cmp dword [esi - 0x51818c00], esi
dec edx
add byte [ebx], dh
xor al, ch
bound edx, qword [esi - 3]
je 0x42cffc
mov dword [eax], esi
cmp ecx, dword [ebp + 8]
push eax
push edi
push ebx
push ecx
call fcn.0047d149
jmp 0x684baa6c
jg 0x42cff0
call 0x79bf1bdb
dec esp
and al, 0x1c
mov esi, dword [eax + ecx*4]
sbb al, 0x8b
xor al, 0x88
dec edx
add byte [ebx], dh
xor al, ch
xor byte [esi - 3], dl
je 0x42d015
xor esi, dword [eax]
call 0x7540265b
jmp 0x4c449bb9
mov ebx, ecx
add dword [ebx + eax*4 - 0x17], ecx
aaa
jne 0x684b9c67
retf
mov al, dl
push 0x4c5f009f
nop
cld
push ss
mov eax, ecx
mov ecx, dword [ebx + 0x6a520845]
outsd dx, dword [esi]
push eax
jmp 0x352540d
cmp esi, dword [eax - 0x17]
dec eax
int3
mov dword [ebp], eax
jne 0x4ac1f0dd
mov bl, 1
jmp 0x5275d08a
add byte [ebx], dh
xor al, ch
popfd
cmp dword [esi + edi*8], esi
call [edi - 0x17]
out 0xd8, eax
mov al, bl
jmp 0x40d92a
jmp [ebp - 0x3f]
int3
sub byte [ecx - 0x720001e0], cl
test byte [eax + 0x504c01cb], dh
push ebx
invalid
push 0xc7043230
invalid
push eax
call fcn.004447ca
jmp 0x53439d80
add dword [esp + 0x28], ecx
mov dword [eax], esp
mov ecx, dword [eax + 0x7c]
push ecx
call 0x30ab132a
xor al, byte [ecx*4 - 0x7bf0fbdc]
push edx
call 0xc14a132a
add al, 0xf
test byte [ecx + 0x50], al
retf
mov edx, dword [ebx]
je 0x42d422
add al, 0xff
les eax, [esi + eax*8]
add al, 0xc6
add byte [eax], al
jmp 0x40a77a
and al, 0x10
add dword [edx], 0x43
adc byte [edx], al
jmp 0xe9429e21
adc dword [ebp + 0x75a5c47d], ecx
in al, 0x80
and eax, 0x16880cff
mov eax, ecx
mov ecx, dword [ebx + 0x68520845]
lea edi, [ebp - 0x3c]
movsd dword es:[edi], dword [esi]
jne 0x42d41b
and byte [0x16880cff], 0x8b
ror dword [ebx + 0x5208458b], 0x68
push edx
push 0xf4e87491
push eax
jmp 0x2cde60d
xchg ecx, eax
je 0x42d430
hlt
adc dword [ebx + 0xc4d8b02], ecx
push 0x44000991
and al, 0x58
mov ecx, dword [edx + eax*4]
push ss
mov eax, ecx
mov ecx, dword [ebx + 0x6a520845]
jns 0x42d4b7
jmp 0x2cde60d
dec esi
jmp 0x7f9d51a
and al, 0x64
add byte [edi - 0x17], ch
mov edx, dword [ecx]
mov edi, eax
mov dword [esp + 0x50], esi
jmp 0x4409ecb
lcall 0xfdf5, 0x3fe90042
cmp eax, esi
je 0xe8949cd1
push eax
call fcn.0044b431
dec ecx
add byte [eax], bh
add eax, dword [eax]
invalid
push eax
push esi
adc al, 0x89
push ecx
adc al, 0x8b
psubsb mm1, mm5
pop eax
inc ecx
sbb byte [ebx + 0x1c428917], cl
mov eax, dword [esi + 0x18]
mov ecx, dword [edi]
add ecx, 0x18
push eax
push ecx
mov ecx, edi
call 0xfc2b30ee
mov edx, dword [esi + 0x1c]
mov eax, dword [edi]
push edx
add eax, 0x1c
push eax
mov ecx, edi
call 0xfc2b30ee
xor esi, esi
jmp 0x10679f0d