Function at 0x4a70f0
Capabilities:
Create thread

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x5c
mov esi, eax
xor ebp, ebp
mov dword [esp], 0x6cee80
call fcn.004b7280
xor eax, eax
lea esi, [esi]
lea edx, [eax + eax*2]
shl edx, 2
mov ecx, dword [edx + 0x7b5a60]
test ecx, ecx
je 0x4a7130
cmp dword [edx + 0x7b5a64], esi
jne 0x4a7130
mov ebp, dword [edx + 0x7b5a68]
nop
inc eax
cmp eax, 0x40
jne 0x4a7110
xor ebx, ebx
test ebp, ebp
jne 0x4a7156
lea esi, [esi]
lea eax, [ebx + ebx*2]
shl eax, 2
mov eax, dword [eax + 0x7b5a60]
test eax, eax
je 0x4a7170
inc ebx
cmp ebx, 0x40
jne 0x4a7140
mov dword [esp], 0x6cee80
call fcn.004b72a0
add esp, 0x5c
mov eax, ebp
pop ebx
pop esi
pop edi
pop ebp
ret
call fcn.004a2d30
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], 0x7166b1
mov dword [esp + 8], str.gpgme:create_writer
mov dword [esp + 4], 0x71674e
mov dword [esp], 7
call fcn.004a2da0
mov dword [esp + 4], 0x1050
mov dword [esp], 1
mov dword [esp + 0x48], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x44], 0xc
call sub.msvcrt.dll_calloc
mov edx, eax
test eax, eax
je 0x4a74c0
cmp esi, 0x1ff
ja 0x4a7510
lea eax, [esi + esi*4]
shl eax, 2
lea edi, [eax + 0x7b8060]
mov eax, dword [eax + 0x7b8060]
test eax, eax
je 0x4a7510
mov eax, dword [edi + 0x10]
mov dword [esp + 0x38], edx
mov dword [esp + 0x20], eax
mov eax, dword [edi + 8]
mov dword [esp + 0x1c], eax
mov eax, dword [edi + 4]
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], 0x7166b1
mov dword [esp + 8], str.gpgme:create_writer
mov dword [esp + 4], str._s:_check:__s_p__fd_d____handle_p_socket_d_dupfrom_d_n
mov dword [esp], 7
call fcn.004a2da0
mov edx, dword [esp + 0x38]
mov eax, dword [edi + 4]
mov dword [edx + 0xc], 1
mov dword [edx], eax
mov eax, dword [edi + 8]
mov dword [edx + 4], eax
lea eax, [esp + 0x44]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], eax
mov edi, dword [sym.imp.KERNEL32.dll_CreateEventA]
call edi
sub esp, 0x10
test eax, eax
mov edx, dword [esp + 0x38]
mov dword [edx + 0x40], eax
je 0x4a73f1
lea eax, [esp + 0x44]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 1
mov dword [esp], eax
mov dword [esp + 0x38], edx
call edi
sub esp, 0x10
test eax, eax
mov edx, dword [esp + 0x38]
mov dword [edx + 0x44], eax
je 0x4a73fc
lea eax, [esp + 0x44]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], eax
mov dword [esp + 0x38], edx
call edi
sub esp, 0x10
mov edx, dword [esp + 0x38]
mov ecx, dword [edx + 0x40]
mov dword [edx + 0x48], eax
test ecx, ecx
je 0x4a73fc
mov ecx, dword [edx + 0x44]
test ecx, ecx
je 0x4a73fc
test eax, eax
je 0x4a73fc
mov eax, ecx
mov dword [esp + 0x38], edx
call fcn.004a6fc0
mov edx, dword [esp + 0x38]
mov ecx, 9
lea edi, [edx + 0x10]
mov dword [edx + 0x44], eax
xor eax, eax
mov dword [esp + 0x3c], edi
rep stosd dword es:[edi], eax
lea eax, [esp + 0x40]
mov byte [edx + 0x10], 1
mov byte [edx + 0x18], 0xff
mov byte [edx + 0x19], 0xff
mov byte [edx + 0x1a], 0xff
mov byte [edx + 0x1b], 0xff
mov dword [esp + 0x14], eax
lea eax, [esp + 0x44]
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], 0
mov dword [esp + 8], 0x4a6ad0
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
sub esp, 0x18
test eax, eax
mov edx, dword [esp + 0x38]
mov dword [edx + 8], eax
je 0x4a7570
mov dword [esp + 0x38], edx
call fcn.004a6a20
mov edx, dword [esp + 0x38]
mov dword [esp + 4], eax
mov eax, dword [edx + 8]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
push eax
push eax
mov dword [esp + 8], str.gpgme:create_writer
mov dword [esp + 4], 0x716415
mov dword [esp], 7
call fcn.004a2da0
call fcn.004a2d50
mov edx, dword [esp + 0x38]
mov ebp, edx
lea eax, [ebx + ebx*2]
shl eax, 2
mov dword [eax + 0x7b5a64], esi
mov dword [eax + 0x7b5a68], ebp
mov dword [eax + 0x7b5a60], 1
jmp 0x4a7156
mov eax, dword [edx + 0x44]
test eax, eax
jne 0x4a72c4
mov dword [esp + 0x38], edx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], 0x7166b1
mov dword [esp + 8], str.gpgme:create_writer
mov dword [esp + 4], str._s:_check:__s_p__CreateEvent_failed:_ec_d_n
mov dword [esp], 7
call fcn.004a2da0
mov edx, dword [esp + 0x38]
mov eax, dword [edx + 0x40]
test eax, eax
je 0x4a744b
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
mov edx, dword [esp + 0x38]
mov eax, dword [edx + 0x44]
test eax, eax
je 0x4a7464
mov dword [esp], eax
mov dword [esp + 0x38], edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
mov edx, dword [esp + 0x38]
mov eax, dword [edx + 0x48]
test eax, eax
je 0x4a747d
mov dword [esp], eax
mov dword [esp + 0x38], edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
mov edx, dword [esp + 0x38]
mov dword [esp], edx
call sub.msvcrt.dll_free
mov dword [esp], 5
call fcn.006c4b80
mov dword [esp + 8], str.gpgme:create_writer
mov dword [esp + 0xc], eax
mov dword [esp + 4], str._s:_error:__s_n
mov dword [esp], 7
call fcn.004a2da0
call fcn.004a2d50
jmp 0x4a73d0
mov edi, dword [sym.imp.msvcrt.dll__errno]
call edi
mov eax, dword [eax]
test eax, eax
je 0x4a7556
call edi
mov eax, dword [eax]
mov dword [esp], eax
call fcn.006c4b80
mov dword [esp + 8], str.gpgme:create_writer
mov dword [esp + 0xc], eax
mov dword [esp + 4], str._s:_error:__s_n
mov dword [esp], 7
xor ebp, ebp
call fcn.004a2da0
call fcn.004a2d50
call edi
jmp 0x4a73d0
mov dword [esp], 5
mov dword [esp + 0x38], edx
call fcn.006c4b80
mov dword [esp + 8], str.gpgme:create_writer
mov dword [esp + 0xc], eax
mov dword [esp + 4], str._s:_error:__s_n
mov dword [esp], 7
call fcn.004a2da0
call fcn.004a2d50
mov edx, dword [esp + 0x38]
mov dword [esp], edx
call sub.msvcrt.dll_free
jmp 0x4a73d0
call edi
mov eax, dword [eax]
mov dword [esp + 8], str.gpgme:create_writer
mov dword [esp + 0xc], eax
mov dword [esp + 4], str._s:_leave:_result_i_n
jmp 0x4a74f2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], 0x7166b1
mov dword [esp + 8], str.gpgme:create_writer
mov dword [esp + 4], str._s:_check:__s_p__CreateThread_failed:_ec_d_n
mov dword [esp], 7
call fcn.004a2da0
mov eax, dword [esp + 0x3c]
mov dword [esp], eax
call fcn.004b72b0
mov edx, dword [esp + 0x38]
mov eax, dword [edx + 0x40]
test eax, eax
jne 0x4a743d
jmp 0x4a744b