Function at 0x4156d0
Capabilities:
Create thread
Resume thread

Disassembly:
push 0xffffffffffffffff
push 0x436298
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
mov eax, dword [0x43e040]
push ebx
push ebp
push esi
push edi
mov ebp, ecx
mov dword [esp + 0x10], eax
mov edi, dword [esp + 0x28]
mov dword [esp + 0x20], 0
mov esi, dword [edi + 4]
mov eax, dword [esi]
push eax
mov ecx, dword [eax - 8]
push ecx
lea ecx, [esp + 0x18]
call fcn.004154a0
mov eax, dword [edi + 8]
add esi, 4
cmp esi, eax
je 0x415763
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edx, 0x43e6d0
test edx, edx
jne 0x415733
xor eax, eax
jmp 0x41573a
push 0x43e6d0
call ebx
push 0x43e6d0
push eax
lea ecx, [esp + 0x18]
call fcn.004154a0
mov eax, dword [esi]
lea ecx, [esp + 0x10]
push eax
mov eax, dword [eax - 8]
push eax
call fcn.004154a0
mov eax, dword [edi + 8]
add esi, 4
cmp esi, eax
jne 0x415726
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx - 8]
lea edx, [eax + eax + 2]
push edx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ebx, eax
mov eax, dword [esp + 0x14]
mov edi, ebx
add esp, 4
mov ecx, dword [eax - 8]
xor eax, eax
lea ecx, [ecx + ecx + 2]
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edx, dword [esp + 0x10]
mov eax, dword [edx - 8]
lea eax, [eax + eax + 2]
shr eax, 1
cmp eax, 0x7fffffff
ja 0x4157d4
test eax, eax
mov esi, eax
mov ecx, ebx
je 0x4157d4
mov ax, word [edx]
test ax, ax
je 0x4157c8
mov word [ecx], ax
add ecx, 2
add edx, 2
dec esi
jne 0x4157b2
jmp 0x4157cc
test esi, esi
jne 0x4157cf
sub ecx, 2
mov word [ecx], 0
push 0x10
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
xor ecx, ecx
mov edx, esi
mov dword [edx], ecx
mov dword [edx + 4], ecx
mov dword [edx + 8], ecx
mov dword [edx + 0xc], ecx
mov eax, dword [ebp + 0x30]
mov dword [esi + 4], eax
mov dword [esi], ebx
mov dword [esi + 8], ebp
mov dword [esp + 0x18], ecx
lea ecx, [esp + 0x18]
push ecx
push 4
push esi
push 0x4158e0
push 0
push 0
call dword [sym.imp.MSVCRT.dll__beginthreadex]
add esp, 0x1c
mov dword [esp + 0x28], eax
test eax, eax
jne 0x415850
mov eax, dword [esp + 0x10]
mov ecx, dword [0x43e044]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x41584c
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x41584c
mov eax, dword [esp + 0x10]
add eax, 0xfffffff4
push eax
call fcn.0042329e
add esp, 4
xor eax, eax
jmp 0x4158c1
mov dword [esi + 0xc], eax
mov ecx, dword [esp + 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov edx, dword [esp + 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea esi, [ebp + 0x18]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [ebp + 0xc]
lea ecx, [ebp + 4]
lea eax, [esp + 0x28]
push eax
push 1
push edx
call fcn.00416a30
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esp + 0x10]
mov edx, dword [0x43e044]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4158bc
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4158bc
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.0042329e
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x14
ret 4