Function at 0x402720
Capabilities:
Encrypt or decrypt data via bcrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
lea eax, [ebp - 0x10]
push eax
push 0
push str.response
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.WININET.dll_InternetGetCookieA]
test eax, eax
jne 0x402746
xor eax, eax
jmp 0x402a00
mov edx, dword [ebp - 0x10]
push edx
push 8
mov eax, dword [0x407b6c]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp - 4]
push edx
call fcn.00402c90
add esp, 8
lea eax, [ebp - 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
push str.response
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.WININET.dll_InternetGetCookieA]
test eax, eax
jne 0x4027a0
mov eax, dword [ebp - 4]
push eax
push 0
mov ecx, dword [0x407b6c]
push ecx
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
jmp 0x402a00
push str.response
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.SHLWAPI.dll_StrStrA]
mov dword [ebp + 0xc], eax
cmp dword [ebp + 0xc], 0
jne 0x4027d2
mov eax, dword [ebp - 4]
push eax
push 0
mov ecx, dword [0x407b6c]
push ecx
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
jmp 0x402a00
push str.response
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, dword [ebp + 0xc]
mov dword [ebp + 0xc], eax
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.00401850
add esp, 8
mov ecx, dword [ebp - 4]
movsx edx, byte [ecx]
cmp edx, 0x23
jne 0x40283c
push str.response
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [ebp + 0xc]
sub ecx, eax
mov dword [ebp + 0xc], ecx
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov ecx, dword [ebp - 4]
push ecx
push 0
mov edx, dword [0x407b6c]
push edx
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, 1
jmp 0x402a00
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call fcn.00402c90
add esp, 8
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
mov eax, dword [ebp - 4]
push eax
call fcn.004016f0
add esp, 0x10
mov dword [ebp - 0x1c], eax
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0x14]
mov dword [edx], 0x4d42444b
mov eax, dword [ebp - 0x14]
mov dword [eax + 4], 1
push 0x407460
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [ebp - 0x14]
mov dword [ecx + 8], eax
push 0x407460
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push 0x407460
lea edx, [ebp - 0x2c]
push edx
call fcn.00401980
add esp, 0xc
push 0
push 0
push 0x4066a8
lea eax, [ebp - 0xc]
push eax
call sub.bcrypt.dll_BCryptOpenAlgorithmProvider
test eax, eax
jge 0x4028f2
mov ecx, dword [ebp - 4]
push ecx
push 0
mov edx, dword [0x407b6c]
push edx
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
jmp 0x402a00
push 0
push 0x1c
lea eax, [ebp - 0x38]
push eax
push 0
push 0
lea ecx, [ebp - 8]
push ecx
push str.KeyDataBlob
push 0
mov edx, dword [ebp - 0xc]
push edx
call sub.bcrypt.dll_BCryptImportKey
test eax, eax
jge 0x40293b
push 0
mov eax, dword [ebp - 0xc]
push eax
call sub.bcrypt.dll_BCryptCloseAlgorithmProvider
mov ecx, dword [ebp - 4]
push ecx
push 0
mov edx, dword [0x407b6c]
push edx
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
jmp 0x402a00
push 0
push 0x20
push str.ChainingModeECB
push str.ChainingMode
mov eax, dword [ebp - 8]
push eax
call sub.bcrypt.dll_BCryptSetProperty
test eax, eax
jge 0x402981
mov ecx, dword [ebp - 8]
push ecx
call sub.bcrypt.dll_BCryptDestroyKey
push 0
mov edx, dword [ebp - 0xc]
push edx
call sub.bcrypt.dll_BCryptCloseAlgorithmProvider
mov eax, dword [ebp - 4]
push eax
push 0
mov ecx, dword [0x407b6c]
push ecx
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
jmp 0x402a00
push 1
lea edx, [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
push 0
push 0
push 0
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 8]
push ecx
call sub.bcrypt.dll_BCryptEncrypt
test eax, eax
jge 0x4029d5
mov edx, dword [ebp - 8]
push edx
call sub.bcrypt.dll_BCryptDestroyKey
push 0
mov eax, dword [ebp - 0xc]
push eax
call sub.bcrypt.dll_BCryptCloseAlgorithmProvider
mov ecx, dword [ebp - 4]
push ecx
push 0
mov edx, dword [0x407b6c]
push edx
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
jmp 0x402a00
mov eax, dword [ebp - 8]
push eax
call sub.bcrypt.dll_BCryptDestroyKey
push 0
mov ecx, dword [ebp - 0xc]
push ecx
call sub.bcrypt.dll_BCryptCloseAlgorithmProvider
mov edx, dword [ebp - 4]
push edx
push 0
mov eax, dword [0x407b6c]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, 1
mov esp, ebp
pop ebp
ret