Function at 0x4057e0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x45e730
mov eax, dword fs:[0]
push eax
sub esp, 0x50
push ebx
push ebp
push esi
push edi
mov eax, dword [0x47f9e8]
xor eax, esp
push eax
lea eax, [esp + 0x64]
mov dword fs:[0], eax
mov dword [esp + 0x28], ecx
xor ebx, ebx
mov dword [esp + 0x24], ebx
call fcn.0040c2f7
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40582b
push 0x80004005
call fcn.00401630
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov ecx, dword [esp + 0x78]
push ecx
push 0x81
lea edx, [esp + 0x20]
push edx
mov dword [esp + 0x78], ebx
call fcn.0041b44d
mov eax, dword [esp + 0x18]
push eax
lea ecx, [esp + 0x24]
call fcn.00407ba0
mov ecx, dword [str.Tianyu_Cryptographic_Service_Provider_To_SM]
push 0xf0000040
push 1
push ecx
push ebx
lea edx, [esp + 0x24]
push edx
mov byte [esp + 0x80], 1
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
cmp eax, ebx
jne 0x4058c5
lea ecx, [esp + 0x20]
mov byte [esp + 0x6c], bl
call fcn.00406fc0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov dword [esp + 0x6c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405af4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x405af4
mov edx, dword [esp + 0x14]
mov edi, dword [sym.imp.ADVAPI32.dll_CryptGetProvParam]
push ebx
lea ecx, [esp + 0x28]
push ecx
push ebx
push 6
push edx
call edi
cmp eax, ebx
je 0x405887
mov ecx, dword [esp + 0x24]
add ecx, 1
push ecx
call fcn.0040bac3
mov esi, eax
add esp, 4
cmp esi, ebx
mov dword [esp + 0x78], esi
jne 0x405924
lea ecx, [esp + 0x20]
mov byte [esp + 0x6c], bl
call fcn.00406fc0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov dword [esp + 0x6c], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x4058b0
mov edx, dword [esp + 0x14]
push ebx
lea ecx, [esp + 0x28]
push ecx
push esi
push 6
push edx
call edi
cmp eax, ebx
je 0x405ad5
mov eax, dword [esp + 0x24]
mov ebp, 1
push ebp
lea ecx, [esp + 0x20]
push ecx
push ebx
mov byte [eax + esi], bl
mov edx, dword [esp + 0x20]
push 2
push edx
mov dword [esp + 0x30], ebx
call edi
cmp eax, ebx
je 0x405ad5
jmp 0x405974
mov ebp, dword [esp + 0x2c]
mov eax, dword [esp + 0x1c]
add eax, 1
push eax
call fcn.0040bac3
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x405ad1
mov ecx, dword [esp + 0x1c]
add ecx, 1
push ecx
push ebx
push esi
call fcn.0043b420
mov eax, dword [esp + 0x20]
add esp, 0xc
push ebp
lea edx, [esp + 0x20]
push edx
push esi
push 2
push eax
call edi
cmp eax, ebx
je 0x405ac8
mov edx, dword [esp + 0x78]
mov ecx, dword [esp + 0x1c]
push edx
push esi
mov byte [ecx + esi], bl
mov dword [esp + 0x34], 2
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
jne 0x4059e2
push esi
call fcn.0040babe
jmp 0x405aaa
mov eax, dword [str.Tianyu_Cryptographic_Service_Provider_To_SM]
push ebx
push 1
push eax
push esi
lea ecx, [esp + 0x24]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
cmp eax, ebx
je 0x405ac8
push 0xc
call fcn.0040ba93
mov ebp, eax
add esp, 4
cmp ebp, ebx
je 0x405a24
mov edx, dword [esp + 0x7c]
mov dword [ebp], 3
mov dword [ebp + 4], edx
mov eax, dword [esp + 0x14]
mov dword [ebp + 8], eax
mov ecx, dword [esp + 0x74]
mov eax, 3
lea edx, [esp + 0x30]
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x28]
push edx
mov dword [esp + 0x38], 0xffff0002
mov dword [esp + 0x3c], 0x27
mov dword [esp + 0x4c], esi
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x60], ebp
call fcn.004035d0
push esi
mov edi, eax
call fcn.0040babe
add esp, 4
cmp edi, ebx
je 0x405a9e
mov eax, dword [esp + 0x7c]
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x28]
push eax
push ecx
push edi
mov ecx, esi
call fcn.00405260
mov edx, dword [esi + 0x78]
push edi
push 2
push 0x1102
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
mov edi, dword [sym.imp.ADVAPI32.dll_CryptGetProvParam]
jmp 0x405aad
push ebp
call fcn.0040babe
mov edi, dword [sym.imp.ADVAPI32.dll_CryptGetProvParam]
add esp, 4
mov ecx, dword [esp + 0x14]
push 2
lea eax, [esp + 0x20]
push eax
push ebx
push 2
push ecx
call edi
cmp eax, ebx
jne 0x405970
jmp 0x405ad1
push esi
call fcn.0040babe
add esp, 4
mov esi, dword [esp + 0x78]
push esi
call fcn.0040babe
add esp, 4
lea ecx, [esp + 0x20]
mov byte [esp + 0x6c], bl
call fcn.00406fc0
lea ecx, [esp + 0x18]
call fcn.004019c0
mov ecx, dword [esp + 0x64]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret 0xc