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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xa8
push ebx
push ebp
push esi
mov ebx, ecx
push edi
push 0xffffffffffffffff
mov dword [esp + 0x38], ebx
push dword [ebx + 0x1c]
mov esi, dword [ebx]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x42272f
xor edi, edi
mov dword [esp + 0x94], edi
xor eax, eax
inc eax
cmp dword [esi + 0x24], edi
jne 0x42272d
mov ebp, dword [esi + 0x34]
mov edx, dword [esi + 0x30]
mov ecx, edx
push ebp
push edx
add ecx, eax
mov dword [esp + 0x6c], edx
push edi
push edi
mov eax, ebp
mov dword [esi + 0x30], ecx
adc eax, edi
mov dword [esp + 0x70], ebp
push edi
push edi
lea edx, [esp + 0x38]
mov dword [esi + 0x34], eax
mov ecx, esi
call fcn.00421c2b
mov edx, dword [esp + 0x38]
mov ecx, eax
mov eax, dword [esi + 0x70]
add esp, 0x18
mov dword [esp + 0x18], ecx
mov ebp, edi
mov dword [esp + 0x14], eax
mov dword [esp + 0x3c], edi
mov dword [esp + 0x78], edi
mov dword [esp + 0x74], edi
mov dword [esp + 0x84], edi
mov dword [esp + 0x40], edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x30], edi
test ecx, ecx
jne 0x422254
mov dword [esp + 0x1c], edi
test edx, edx
jne 0x422258
mov ebp, dword [ebx + 8]
xor edi, edi
mov ebx, dword [esi + 0x64]
sub ebx, dword [esi + 0x60]
mov dword [esp + 0x2c], edi
mov dword [esp + 0x4c], edi
mov dword [esp + 0x48], edi
mov dword [esp + 0x30], edi
test ebp, ebp
jne 0x421e43
mov eax, dword [esi]
mov ecx, dword [esi + 0x14]
add eax, 0x10
push eax
push ecx
call dword [ecx]
mov ebp, eax
pop ecx
pop ecx
test ebp, ebp
je 0x422065
mov ecx, dword [esp + 0x2c]
mov dword [ebp], edi
test ecx, ecx
je 0x421e3c
mov dword [ecx], ebp
jmp 0x421e43
mov eax, dword [esp + 0x34]
mov dword [eax + 8], ebp
lea eax, [ebp + 0x10]
mov dword [esp + 0x44], eax
mov dword [esp + 0x38], eax
test ebx, ebx
je 0x421e7a
mov eax, dword [esi + 0x60]
mov edx, ebx
add eax, 0x10
mov dword [esp + 0x28], edi
add eax, dword [esi + 0x5c]
mov edi, dword [esp + 0x2c]
mov dword [esp + 0x24], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x38], eax
jmp 0x421f94
mov edi, dword [esi]
mov ecx, eax
mov eax, dword [esi + 0xc]
xor edx, edx
mov dword [esp + 0x50], ecx
mov dword [esp + 0x88], eax
mov dword [esp + 0x1c], edx
jmp 0x421ed8
lea edx, [esp + 0x54]
mov dword [esp + 0x54], edi
push edx
push ecx
push eax
call dword [eax]
mov edx, dword [esp + 0x28]
add esp, 0xc
mov ecx, dword [esp + 0x50]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x54]
add edx, eax
add ecx, eax
mov dword [esp + 0x1c], edx
sub edi, eax
mov dword [esp + 0x50], ecx
cmp dword [esp + 0x18], 0
jne 0x42205c
test eax, eax
je 0x421edc
mov eax, dword [esp + 0x88]
test edi, edi
jne 0x421e94
xor ecx, ecx
mov dword [esp + 0x18], ecx
add dword [esp + 0x24], edx
mov edi, dword [esp + 0x2c]
push 0
pop eax
adc dword [esp + 0x28], eax
test edi, edi
mov eax, dword [esp + 0x40]
cmove eax, edx
add dword [esi + 0x68], edx
mov dword [esp + 0x40], eax
push 0
pop eax
adc dword [esi + 0x6c], eax
cmp edx, dword [esi]
setne al
mov dword [esp + 0x14], eax
xor eax, eax
inc eax
cmp edx, dword [esi]
je 0x421f1a
mov dword [esi + 0x70], eax
test ecx, ecx
je 0x421f2e
mov dword [esi + 0x70], eax
mov dword [esp + 0x14], eax
xor eax, eax
mov dword [esi + 0x48], ecx
mov dword [esp + 0x18], eax
mov ecx, dword [esp + 0x24]
sub ecx, dword [esp + 0x4c]
mov eax, dword [esp + 0x28]
sbb eax, dword [esp + 0x48]
mov dword [esp + 0x8c], eax
jne 0x421f4e
xor eax, eax
inc eax
cmp ecx, eax
jb 0x421f94
push dword [esp + 0x60]
xor eax, eax
lea edx, [esp + 0x24]
push dword [esp + 0x68]
mov ecx, esi
push eax
push eax
push eax
push eax
call fcn.00421c2b
add esp, 0x18
mov dword [esp + 0x18], eax
test eax, eax
jne 0x4221e7
cmp dword [esp + 0x20], eax
jne 0x4221e7
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x48], eax
xor eax, eax
mov dword [esp + 0xa0], edx
test edi, edi
lea ecx, [esp + 0x98]
mov edi, dword [esp + 0x38]
sete al
mov dword [esp + 0x9c], edi
mov dword [esp + 0x98], eax
mov eax, dword [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x38]
mov dword [esp + 0xa8], eax
xor eax, eax
inc eax
mov dword [esp + 0xb0], eax
push dword [ecx + 4]
mov eax, dword [esi + 0x18]
push dword [esi + 0x1c]
call dword [eax]
mov eax, dword [esp + 0xb8]
xor ecx, ecx
inc ecx
mov dword [esp + 0x3c], eax
add esp, 0xc
mov dword [esp + 0x78], ecx
cmp dword [esp + 0xa8], ecx
je 0x4221b8
mov edi, dword [esp + 0xa0]
test ebx, ebx
je 0x422024
push edi
push dword [esp + 0x3c]
lea eax, [ebp + 0x10]
push eax
call sub.msvcrt.dll_memcpy
add dword [esi + 0x60], edi
xor ecx, ecx
add esp, 0xc
inc ecx
cmp dword [esp + 0xa8], 0
mov eax, dword [esp + 0x14]
jne 0x42209e
test eax, eax
jne 0x4220ad
cmp edi, dword [esp + 0x1c]
jne 0x42207f
mov dword [esp + 0x2c], ebp
mov ebp, dword [ebp]
push eax
pop edi
test ebx, ebx
je 0x421e11
xor edi, edi
mov ebx, edi
mov dword [esi + 0x60], edi
mov dword [esi + 0x64], edi
jmp 0x421e11
mov ecx, dword [esp + 0x18]
jmp 0x421ee2
xor ecx, ecx
mov dword [esp + 0x1c], edi
inc ecx
mov ebp, edi
mov eax, ecx
mov dword [esp + 0x74], ecx
mov dword [esp + 0x14], eax
xor ebx, ebx
jmp 0x4221f3
mov edi, dword [esp + 0x30]
xor eax, eax
mov ebx, eax
mov dword [esp + 0x18], 0xb
mov dword [esp + 0x1c], eax
mov ebp, eax
mov dword [esp + 0x2c], ebx
jmp 0x42229a
cmp dword [esp + 0xa8], 3
cmove eax, ecx
mov dword [esp + 0x14], eax
mov ebp, dword [esp + 0x1c]
mov dword [esp + 0x3c], ecx
cmp edi, ebp
jne 0x4220c6
xor ebx, ebx
mov dword [esi + 0x60], ebx
mov dword [esi + 0x64], ebx
jmp 0x4221ed
cmp dword [esp + 0xa8], 3
jne 0x42212c
xor eax, eax
mov dword [esi + 0x60], eax
mov dword [esi + 0x64], eax
test ebx, ebx
je 0x4220fe
mov eax, ebp
sub eax, edi
push eax
mov eax, dword [esp + 0x3c]
add eax, edi
push eax
mov eax, dword [esp + 0x4c]
add eax, edi
push eax
call sub.msvcrt.dll_memcpy
mov edi, dword [esp + 0xac]
add esp, 0xc
mov ecx, dword [esp + 0x38]
sub ebp, edi
mov eax, dword [esp + 0x14]
add ecx, edi
sub dword [esp + 0x24], ebp
push 0
pop ebx
sbb dword [esp + 0x28], ebx
mov dword [esp + 0x1c], ecx
cmp dword [esp + 0x2c], ebx
jne 0x4221f3
mov dword [esp + 0x40], edi
jmp 0x4221f3
test ebx, ebx
je 0x42213c
xor ebx, ebx
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], ebx
jmp 0x4221a0
mov eax, dword [esi + 0x5c]
test eax, eax
jne 0x42215f
mov eax, dword [esi]
mov ecx, dword [esi + 0x14]
add eax, 0x10
push eax
push ecx
call dword [ecx]
pop ecx
pop ecx
test eax, eax
je 0x422166
mov edi, dword [esp + 0xa0]
mov dword [esi + 0x5c], eax
lea ecx, [eax + 0x10]
test ecx, ecx
jne 0x422175
xor ecx, ecx
inc ecx
mov eax, ecx
mov dword [esp + 0x74], ecx
mov dword [esp + 0x14], eax
jmp 0x4221eb
mov eax, dword [esp + 0x38]
sub ebp, edi
sub dword [esp + 0x24], ebp
push 0
pop ebx
sbb dword [esp + 0x28], ebx
add eax, edi
push ebp
push eax
push ecx
mov dword [esi + 0x64], ebp
mov dword [esi + 0x60], ebx
call sub.msvcrt.dll_memcpy
mov edi, dword [esp + 0xac]
add esp, 0xc
mov edx, dword [esp + 0x40]
mov eax, ebx
cmp dword [esp + 0x2c], 0
mov dword [esp + 0x14], eax
cmove edx, edi
mov dword [esp + 0x40], edx
jmp 0x4221ed
mov dword [esp + 0x84], ecx
mov eax, ecx
mov dword [esp + 0x14], eax
test ebx, ebx
je 0x4220b9
push dword [esp + 0x1c]
push edi
push dword [esp + 0x4c]
call sub.msvcrt.dll_memcpy
mov eax, dword [esp + 0x20]
add esp, 0xc
jmp 0x4220b9
mov eax, dword [esp + 0x14]
xor ebx, ebx
mov ebp, ebx
mov dword [esp + 0x1c], ebx
mov ecx, dword [esp + 0x18]
test ecx, ecx
jne 0x422250
lea edi, [esi + 0xb0]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esi + 0x88], ebx
je 0x422233
mov eax, dword [esp + 0x60]
cmp eax, dword [esi + 0x94]
jb 0x422233
ja 0x42222a
mov eax, dword [esp + 0x64]
cmp eax, dword [esi + 0x90]
jbe 0x422233
xor eax, eax
inc eax
mov dword [esp + 0x20], eax
jmp 0x422237
mov dword [esp + 0x20], ebx
mov eax, dword [esi + 0x9c]
push edi
mov dword [esp + 0x1c], eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x20]
mov edi, dword [esp + 0x30]
xor ebx, ebx
mov dword [esp + 0x2c], ebx
test ecx, ecx
jne 0x42229a
cmp dword [esp + 0x3c], ebx
je 0x422293
test edx, edx
jne 0x42229a
mov ecx, dword [esp + 0x34]
mov eax, dword [esi + 0x18]
push dword [ecx + 4]
push dword [esi + 0x1c]
call dword [eax + 4]
mov ebx, eax
mov dword [esp + 0x34], ebx
pop ecx
pop ecx
test ebx, ebx
je 0x4222a3
xor eax, eax
mov dword [esp + 0x3c], eax
inc eax
mov dword [esp + 0x14], eax
cmp dword [esp + 0x20], 0
je 0x4222a7
xor eax, eax
inc eax
mov dword [esp + 0x14], eax
jmp 0x4222a7
mov eax, dword [esp + 0x14]
xor ecx, ecx
mov dword [esp + 0x88], ecx
mov dword [esp + 0x80], ecx
test eax, eax
jne 0x42238e
mov eax, dword [esi + 0x58]
cmp eax, dword [esi + 0x54]
jae 0x422307
test edi, edi
je 0x422307
add eax, 5
imul ecx, eax, 0x28
add ecx, esi
call fcn.00421b73
mov ecx, eax
test ecx, ecx
jne 0x4222e3
inc dword [esi + 0x58]
jmp 0x422307
mov eax, dword [esi + 0x58]
xor edx, edx
inc edx
cmp eax, edx
jne 0x422304
mov edi, dword [esp + 0x34]
xor eax, eax
mov dword [esp + 0x14], edx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x80], ecx
jmp 0x422339
mov dword [esi + 0x54], eax
mov edi, dword [esp + 0x34]
mov ecx, dword [edi + 4]
inc ecx
cmp ecx, dword [esi + 0x58]
sbb eax, eax
and eax, ecx
add eax, 5
imul eax, eax, 0x28
add eax, esi
mov dword [esp + 0x88], eax
lea ecx, [eax + 0x1c]
call fcn.00423fdc
test eax, eax
jne 0x42272f
mov eax, dword [esp + 0x3c]
xor ecx, ecx
and dword [esp + 0x68], 0
mov edx, ecx
and dword [esp + 0x6c], 0
cmp dword [esp + 0x18], 0
mov dword [esp + 0x38], ecx
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], ecx
mov dword [esp + 0x54], ecx
mov dword [esp + 0x58], edx
mov dword [esp + 0x5c], ecx
jne 0x4224d5
test eax, eax
je 0x4224d5
test ebx, ebx
jne 0x4224d5
mov ebx, dword [edi + 8]
xor eax, eax
inc eax
mov dword [esp + 0x30], ebx
test eax, eax
je 0x422398
mov edi, dword [esp + 0x40]
jmp 0x4223bb
mov edi, dword [esp + 0x34]
mov eax, dword [esp + 0x3c]
jmp 0x42233b
mov ebx, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
sub ebx, edx
mov edi, dword [esi]
sbb eax, ecx
cmp dword [esp + 0x94], eax
jb 0x4223b7
ja 0x4223b5
cmp edi, ebx
jbe 0x4223b7
mov edi, ebx
mov ebx, dword [esp + 0x30]
add edx, edi
mov dword [esp + 0x44], 1
push 0
pop eax
adc ecx, eax
mov dword [esp + 0x58], edx
mov dword [esp + 0x5c], ecx
cmp edx, dword [esp + 0x24]
jne 0x4223df
cmp ecx, dword [esp + 0x28]
jne 0x4223df
inc eax
mov ecx, dword [esi + 0x18]
lea edx, [esp + 0x44]
push edx
lea edx, [esp + 0x6c]
push edx
lea edx, [esp + 0x60]
push edx
push eax
push edi
lea eax, [ebx + 0x10]
push eax
mov eax, dword [esp + 0x4c]
push dword [eax + 4]
push dword [esi + 0x1c]
call dword [ecx + 8]
add esp, 0x20
mov dword [esp + 0x2c], eax
test eax, eax
jne 0x4224c4
cmp dword [esp + 0x44], eax
jne 0x4224d5
mov edx, dword [esp + 0x58]
mov ecx, dword [esp + 0x5c]
cmp edx, dword [esp + 0x24]
jne 0x422435
cmp ecx, dword [esp + 0x28]
je 0x4224d5
mov edi, dword [esp + 0x68]
mov eax, edx
sub eax, dword [esp + 0x38]
mov ebx, ecx
sbb ebx, dword [esp + 0x4c]
sub edi, dword [esp + 0x50]
mov dword [esp + 0x48], ebx
mov ebx, dword [esp + 0x6c]
sbb ebx, dword [esp + 0x54]
cmp dword [esp + 0x48], 0
ja 0x42246c
jb 0x422463
cmp eax, 1
jae 0x42246c
test ebx, ebx
jne 0x42246c
cmp edi, 1
jb 0x4224b7
push dword [esp + 0x60]
lea edx, [esp + 0x24]
mov ecx, esi
push dword [esp + 0x68]
push ebx
push edi
push dword [esp + 0x58]
push eax
call fcn.00421c2b
add esp, 0x18
mov dword [esp + 0x18], eax
test eax, eax
jne 0x4224d5
cmp dword [esp + 0x20], eax
jne 0x4224d5
mov eax, dword [esp + 0x68]
mov edx, dword [esp + 0x58]
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x6c]
mov dword [esp + 0x38], edx
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x54], eax
mov ebx, dword [esp + 0x30]
xor eax, eax
mov ebx, dword [ebx]
jmp 0x422380
push dword [esp + 0x60]
mov ecx, esi
push dword [esp + 0x68]
call fcn.00421ce4
pop ecx
pop ecx
mov eax, dword [esp + 0x34]
push 0xffffffffffffffff
push dword [eax + 0x20]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x42272f
mov ebx, dword [esp + 0x78]
xor edx, edx
xor ecx, ecx
mov edi, edx
inc ecx
mov dword [esp + 0x48], edi
mov dword [esp + 0x44], ecx
cmp dword [esi + 0x24], edx
jne 0x42272d
cmp dword [esi + 0x50], edx
je 0x422515
mov eax, ecx
mov dword [esp + 0x20], eax
jmp 0x422575
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x422532
mov dword [esi + 0x50], ecx
cmp eax, 2
mov ecx, dword [esp + 0x74]
push 1
mov dword [esi + 0x4c], eax
pop eax
cmove ecx, eax
jmp 0x422536
mov ecx, dword [esp + 0x74]
mov eax, dword [esp + 0x80]
test eax, eax
je 0x42254c
xor ebx, ebx
mov dword [esi + 0x40], eax
inc ebx
mov dword [esi + 0x50], ebx
mov ebx, edx
test ecx, ecx
je 0x42255d
xor ecx, ecx
mov ebx, edx
inc ecx
mov dword [esi + 0x50], ecx
mov dword [esi + 0x38], ecx
jmp 0x422560
xor ecx, ecx
inc ecx
mov eax, dword [esp + 0x20]
cmp dword [esp + 0x84], edx
je 0x422575
mov dword [esi + 0x50], ecx
mov ebx, edx
mov dword [esi + 0x3c], ecx
cmp dword [esp + 0x3c], edx
je 0x4225d3
test eax, eax
je 0x422597
mov eax, edx
mov dword [esp + 0x68], edx
mov ecx, edx
mov dword [esp + 0x58], eax
xor edi, edi
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x6c], edi
jmp 0x4225a7
mov ecx, dword [esp + 0x5c]
mov eax, dword [esp + 0x58]
mov edi, dword [esp + 0x6c]
mov edx, dword [esp + 0x68]
sub eax, dword [esp + 0x38]
sbb ecx, dword [esp + 0x4c]
sub edx, dword [esp + 0x50]
sbb edi, dword [esp + 0x54]
push edi
push edx
push ecx
push eax
lea ecx, [esi + 0x98]
call fcn.00421ad6
mov edi, dword [esp + 0x58]
add esp, 0x10
mov dword [esp + 0x18], eax
jmp 0x4225d7
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
xor ecx, ecx
test edx, edx
sete cl
cmp dword [esp + 0x78], 0
mov dword [esp + 0x7c], ecx
je 0x422667
test eax, eax
jne 0x422600
test ebx, ebx
je 0x422600
cmp dword [esp + 0x20], eax
jne 0x422600
lea ecx, [eax + 1]
jmp 0x422604
xor eax, eax
mov ecx, eax
mov ebx, dword [esp + 0x34]
lea edx, [esp + 0x44]
mov eax, dword [esi + 0x18]
push edx
lea edx, [esp + 0x80]
push edx
push ebp
push dword [esp + 0x28]
push ecx
push dword [ebx + 4]
push dword [esi + 0x1c]
call dword [eax + 0xc]
add esp, 0x1c
mov dword [esp + 0x18], eax
test eax, eax
je 0x42263c
xor eax, eax
inc eax
mov edi, eax
mov dword [esi + 0x50], eax
jmp 0x42264c
mov ecx, dword [esp + 0x7c]
mov edx, dword [esp + 0x14]
test ecx, ecx
jne 0x42266f
test edx, edx
jne 0x42266f
push dword [esp + 0x60]
mov ecx, esi
push dword [esp + 0x68]
call fcn.00421ce4
mov edx, dword [esp + 0x1c]
pop ecx
pop ecx
mov ecx, dword [esp + 0x7c]
jmp 0x42266b
mov ebx, dword [esp + 0x34]
mov eax, dword [esp + 0x18]
cmp dword [esp + 0x44], 0
je 0x4226d8
cmp dword [esp + 0x3c], 0
je 0x4226a0
test eax, eax
jne 0x4226a0
cmp dword [esi + 0x50], eax
jne 0x4226a2
cmp dword [esp + 0x2c], eax
jne 0x4226a2
cmp dword [esp + 0x20], eax
jne 0x4226a2
cmp dword [esi + 0x84], eax
jne 0x4226b3
test edi, edi
je 0x4226d8
jmp 0x4226a2
xor eax, eax
cmp dword [esi + 0x84], eax
jne 0x4226b3
mov eax, dword [ebx + 4]
mov dword [esi + 0x80], eax
mov edi, dword [esp + 0x24]
mov eax, edi
mov ebp, dword [esp + 0x28]
or eax, ebp
jne 0x4226c5
test edx, edx
jne 0x4226e8
mov eax, dword [esp + 0x40]
mov dword [ebx + 0xc], eax
mov dword [ebx + 0x10], edi
mov dword [ebx + 0x14], ebp
inc dword [esi + 0x84]
test edx, edx
jne 0x4226e8
mov ecx, dword [esp + 0x88]
add ecx, 0x20
jmp 0x42270e
test ecx, ecx
je 0x4226fd
lea ecx, [esi + 0xe8]
call fcn.00423fdc
test eax, eax
jne 0x42272f
jmp 0x422708
xor eax, eax
cmp dword [ebx + 4], eax
je 0x42272d
inc eax
mov dword [esi + 0x24], eax
lea ecx, [esi + 0xe4]
call fcn.00423fdc
test eax, eax
jne 0x42272f
push 0xffffffffffffffff
push dword [ebx + 0x1c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x42272f
xor edi, edi
jmp 0x421d6c
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret