Function at 0x51c390
Capabilities:
Create thread

Disassembly:
push ebp
lea ebp, [esp - 0x254]
sub esp, 0x254
push 0xffffffffffffffff
push 0x5f3196
mov eax, dword fs:[0]
push eax
sub esp, 0xa0
mov eax, dword [0x69001c]
xor eax, ebp
mov dword [ebp + 0x250], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [ebp + 0x264]
mov ebx, dword [ebp + 0x260]
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x34], eax
call fcn.00409c60
mov ecx, eax
test ecx, ecx
je 0x51ce0f
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x4c], eax
mov dword [ebp - 4], 1
or edi, 0xffffffff
cmp dword [ebx + 4], 0
jle 0x51c41f
lea eax, [ebp - 0x4c]
mov ecx, esi
push eax
call fcn.0051c2d0
mov ebx, eax
test ebx, ebx
jne 0x51cdb3
call fcn.00409c60
mov ecx, eax
test ecx, ecx
je 0x51ce0f
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x30], eax
mov byte [ebp - 4], 3
call fcn.00409c60
mov ecx, eax
test ecx, ecx
je 0x51ce0f
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x28], eax
mov byte [ebp - 4], 5
cmp byte [ebp + 0x268], 0
jne 0x51c541
lea edx, [esi + 0x60]
lea ecx, [ebp - 0x18]
call fcn.004feff0
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x30]
push eax
call fcn.0041b220
mov byte [ebp - 4], 5
mov eax, edi
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x51c49e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax - 0xc]
test ecx, ecx
jle 0x51c4cc
lea edx, [ecx - 1]
test edx, edx
js 0x51cdf9
cmp edx, ecx
jg 0x51cdf9
cmp word [eax + edx*2], 0x5c
je 0x51c4cc
push 0x5c
lea ecx, [ebp - 0x30]
call fcn.0041b3b0
lea eax, [esi + 0x68]
push eax
lea ecx, [ebp - 0x28]
call fcn.0041b220
mov eax, dword [ebp - 0x28]
mov edx, dword [eax - 0xc]
test edx, edx
jle 0x51c506
lea ecx, [edx - 1]
test ecx, ecx
js 0x51cdf9
cmp ecx, edx
jg 0x51cdf9
cmp word [eax + ecx*2], 0x5c
je 0x51c506
push 0x5c
lea ecx, [ebp - 0x28]
call fcn.0041b3b0
lea eax, [ebp - 0x18]
mov ecx, esi
push eax
call fcn.0051cf50
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x28]
mov eax, dword [eax]
push dword [eax - 0xc]
push eax
call fcn.0041a840
mov byte [ebp - 4], 5
mov eax, edi
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x51c541
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov byte [ebp - 4], 0xb
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x6c], 0
mov dword [ebp - 0x68], 0
mov byte [ebp - 4], 0xc
lea eax, [ebp - 0x64]
mov dword [ebp - 0x40], eax
call fcn.00409c60
mov ecx, eax
test ecx, ecx
je 0x51ce0f
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x64], eax
mov byte [ebp - 4], 0xe
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 0x61675c
mov dword [ebp - 0x58], 0
mov byte [ebp - 4], 0x10
xor ebx, ebx
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x10], ebx
cmp dword [eax + 4], ebx
jle 0x51cab5
push 0x260
call fcn.005904a9
mov edi, eax
mov dword [ebp - 0xa8], edi
mov byte [ebp - 4], 0x11
push 0x260
push 0
push edi
call fcn.005929f0
add esp, 0x10
mov dword [edi], 0xffffffff
lea ecx, [edi + 0x10]
mov byte [edi + 8], 1
call fcn.00539a40
mov byte [ebp - 4], 0x12
lea eax, [edi + 0x258]
mov dword [edi + 0x250], 0
mov dword [edi + 0x254], 0
mov dword [ebp - 0xac], eax
call fcn.00409c60
mov ecx, eax
test ecx, ecx
je 0x51ce0f
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [edi + 0x258], eax
mov byte [ebp - 4], 0x10
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x1c]
cmp ecx, eax
jne 0x51c784
mov edx, dword [ebp - 0x24]
lea ebx, [ebp - 0x74]
cmp ebx, edx
jb 0x51c664
lea eax, [edx + eax*4]
cmp ebx, eax
jb 0x51ce0f
mov eax, dword [ebp - 0x1c]
test eax, eax
jne 0x51c66d
lea ebx, [eax + 1]
jmp 0x51c67c
lea ebx, [ecx + ecx]
test ebx, ebx
js 0x51c6a3
cmp ebx, 0x1fffffff
ja 0x51c6a3
push 4
push ebx
push edx
call fcn.00597df3
add esp, 0xc
test eax, eax
je 0x51c69d
mov dword [ebp - 0x1c], ebx
mov ebx, dword [ebp - 0x10]
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x20]
jmp 0x51c787
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x24]
mov ebx, dword [ebp - 0x10]
test ebx, ebx
js 0x51ce03
cmp ebx, ecx
jge 0x51ce03
lea edi, [ebx*4]
mov eax, dword [edi + edx]
mov dword [ebp - 0x10], eax
lea ecx, [eax + 0x10]
mov dword [ebp - 0x18], ecx
mov cl, byte [ebp + 0x268]
mov byte [eax + 8], cl
lea eax, [ebp - 0x4c]
push eax
call fcn.00539be0
test al, al
je 0x51cb66
call fcn.00409c60
mov ecx, eax
test ecx, ecx
je 0x51ce0f
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 0x17
cmp byte [ebp + 0x268], 0
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx + 4]
je 0x51c86e
cmp ebx, eax
jge 0x51ce03
mov eax, dword [edx]
mov ecx, dword [ebp - 0x10]
mov eax, dword [eax + edi]
mov dword [ecx], eax
cmp ebx, dword [edx + 4]
jge 0x51ce03
mov eax, dword [edx]
mov ecx, dword [eax + edi]
test ecx, ecx
js 0x51ce03
cmp ecx, dword [esi + 0x7c]
jge 0x51ce03
mov eax, dword [esi + 0x78]
mov edx, ecx
shl ecx, 5
shl edx, 5
add edx, eax
mov dword [ebp - 0x54], edx
mov eax, dword [ecx + eax + 8]
mov ecx, dword [ebp - 0x10]
shr eax, 1
and eax, 0xffffff01
mov dword [ebp - 0x50], eax
mov eax, dword [edx]
mov dword [ecx + 4], eax
mov edi, dword [edx + 4]
lea eax, [edi - 4]
cmp eax, 6
ja case.0x51c77d.6
movzx eax, byte [eax + 0x51ce24]
jmp dword [eax*4 + 0x51ce1c]
mov eax, dword [ebp - 0x24]
lea eax, [eax + ecx*4]
mov dword [ebp - 0x7c], ecx
mov dword [ebp - 0x44], eax
mov byte [ebp - 4], 0x15
test eax, eax
je 0x51c79a
mov dword [eax], edi
mov byte [ebp - 4], 0x10
mov ecx, dword [ebp - 0x20]
inc ecx
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 0x24]
jmp 0x51c6a6
mov eax, dword [esi + 0x70]
lea ecx, [esi + 0x70]
cmp dword [eax - 0xc], 0
jne 0x51c7bc
lea ecx, [esi + 0x68]
lea eax, [edx + 0x18]
mov edx, ecx
push eax
lea ecx, [ebp - 0x38]
call fcn.004fb4e0
add esp, 4
mov byte [ebp - 4], 0x18
cmp edi, 9
je 0x51c7db
cmp edi, 0xa
jne 0x51c7ed
mov ecx, dword [ebp - 0x10]
lea eax, [ebp - 0x38]
push eax
lea ecx, [ecx + 0x258]
call fcn.0041b220
lea edx, [ebp - 0x38]
lea ecx, [ebp - 0x78]
call fcn.004feff0
mov byte [ebp - 4], 0x19
lea ecx, [ebp - 0x14]
push eax
call fcn.0041b220
mov byte [ebp - 4], 0x18
or eax, 0xffffffff
mov edx, dword [ebp - 0x78]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x51c824
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor edx, edx
lea eax, [esi + 0x108]
cmp byte [ebp - 0x50], dl
lea ecx, [esi + 0x60]
push eax
cmovne edx, esi
lea eax, [ebp - 0x14]
push eax
lea eax, [edx + 4]
neg edx
sbb edx, edx
and edx, eax
mov eax, dword [ebp - 0x54]
push edx
push 0
push dword [eax + 0xc]
push 0
push dword [eax + 0x10]
push ecx
mov ecx, dword [ebp - 0x18]
call fcn.00539c80
test eax, eax
jne 0x51cb0e
mov byte [ebp - 4], 0x17
mov edx, dword [ebp - 0x38]
jmp 0x51ca1f
cmp ebx, eax
jge 0x51ce03
mov eax, dword [edx]
mov ecx, dword [eax + edi]
test ecx, ecx
js 0x51ce03
cmp ecx, dword [esi + 0x9c]
jge 0x51ce03
mov eax, dword [esi + 0x98]
mov edi, dword [eax + ecx*8 + 4]
lea ecx, [eax + ecx*8]
cmp edi, 9
je 0x51c8a6
cmp edi, 0xa
jne 0x51c90c
lea eax, [edi - 4]
cmp eax, 6
ja case.0x51c8b5.6
movzx eax, byte [eax + 0x51ce34]
jmp dword [eax*4 + 0x51ce2c]
mov eax, dword [esi + 0x70]
lea edx, [esi + 0x70]
cmp dword [eax - 0xc], 0
jne 0x51c8cb
lea edx, [esi + 0x68]
push ecx
lea ecx, [ebp - 0x40]
call fcn.004fb4e0
add esp, 4
mov byte [ebp - 4], 0x1d
mov ecx, dword [ebp - 0x10]
push eax
lea ecx, [ecx + 0x258]
call fcn.0041b220
mov byte [ebp - 4], 0x17
or eax, 0xffffffff
mov edx, dword [ebp - 0x40]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x51c909
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x2c]
cmp ebx, dword [edx + 4]
jge 0x51ce03
mov eax, dword [edx]
lea ecx, [ebx*4]
mov ecx, dword [eax + ecx]
test ecx, ecx
js 0x51ce03
cmp ecx, dword [esi + 0x9c]
jge 0x51ce03
mov eax, dword [esi + 0x98]
lea edx, [ebp - 0x30]
lea eax, [eax + ecx*8]
push eax
lea ecx, [ebp - 0x3c]
call fcn.004fb4e0
mov byte [ebp - 4], 0x1f
lea eax, [ebp]
push 0x250
push 0
push eax
call fcn.005929f0
add esp, 0x10
lea eax, [ebp]
push eax
push dword [ebp - 0x3c]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x84], 0x62a540
mov dword [ebp - 0x80], eax
mov byte [ebp - 4], 0x20
xor ecx, ecx
add ecx, dword [ebp + 0x20]
mov edx, dword [ebp + 0x1c]
adc edx, 0
mov dword [ebp - 0x50], ecx
mov dword [ebp - 0x54], edx
mov byte [ebp - 4], 0x1f
mov dword [ebp - 0x84], 0x62a540
test eax, eax
je 0x51c9b0
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov dword [ebp - 0x80], 0
cmp edi, 6
je 0x51c9e1
cmp edi, 7
je 0x51c9e1
lea eax, [edi - 4]
cmp eax, 6
ja case.0x51c9c9.6
movzx eax, byte [eax + 0x51ce44]
jmp dword [eax*4 + 0x51ce3c]
mov eax, dword [esi + 0x70]
lea ecx, [esi + 0x70]
cmp dword [eax - 0xc], 0
jne 0x51c9e4
lea ecx, [esi + 0x68]
jmp 0x51c9e4
lea ecx, [ebp - 0x28]
push ecx
lea ecx, [ebp - 0x14]
call fcn.0041b220
mov ecx, dword [ebp - 0x18]
lea eax, [esi + 0x108]
push eax
lea eax, [ebp - 0x14]
push eax
push 0
push dword [ebp - 0x54]
lea eax, [ebp - 0x3c]
push dword [ebp - 0x50]
push 0
push 0
push eax
call fcn.00539c80
test eax, eax
jne 0x51cb17
mov byte [ebp - 4], 0x17
mov edx, dword [ebp - 0x3c]
or eax, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x51ca37
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [esi + 0xb0]
mov dl, 1
push eax
lea ecx, [ebp - 0x14]
call fcn.004fff60
add esp, 4
cmp byte [esi + 0x94], 0
je 0x51ca65
cmp edi, 6
jne 0x51ca65
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x70]
call fcn.004fa910
mov eax, dword [ebp - 0x34]
cmp dword [eax], 0
je 0x51ca86
push dword [ebp - 0x18]
mov eax, dword [0x697d14]
call eax
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0x250], eax
mov dword [ecx + 0x254], edx
mov byte [ebp - 4], 0x10
or eax, 0xffffffff
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x51caa5
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x2c]
inc ebx
mov dword [ebp - 0x10], ebx
cmp ebx, dword [eax + 4]
jl 0x51c5c1
mov eax, dword [ebp + 0x25c]
mov dword [ebp - 0x9c], eax
lea eax, [ebp - 0x24]
mov dword [ebp - 0xa0], esi
mov dword [ebp - 0x98], eax
mov dword [ebp - 0x94], esi
mov dword [ebp - 0x8c], 0x61675c
mov dword [ebp - 0x88], 0
mov byte [ebp - 4], 0x26
lea ecx, [ebp - 0xa0]
mov esi, dword [ebp - 0x34]
push esi
call fcn.0053ac40
mov ebx, eax
test ebx, ebx
je 0x51cb76
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x51cc54
mov byte [ebp - 4], 0x17
mov edx, dword [ebp - 0x38]
jmp 0x51cb1e
mov byte [ebp - 4], 0x17
mov edx, dword [ebp - 0x3c]
or edi, 0xffffffff
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x51cb38
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x10
mov eax, edi
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x51cb56
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, 0xe
jmp 0x51cc7c
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, 0xb
jmp 0x51cc79
cmp dword [ebp - 0x6c], 0
mov edi, dword [esi + 8]
mov dword [ebp - 0x60], edi
je 0x51cc4c
test edi, edi
je 0x51cbb7
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov ecx, dword [ebp - 0x58]
mov esi, eax
cmp esi, ecx
je 0x51cbaf
mov edx, dword [ebp - 0x5c]
lea ecx, [ebp - 0x5c]
call dword [edx + 4]
mov ecx, esi
mov dword [ebp - 0x58], ecx
mov eax, dword [edi]
push ecx
mov ecx, edi
call dword [eax + 0x20]
lea eax, [ebp - 0x34]
push eax
push 0
lea eax, [ebp - 0x70]
push eax
push 0x539d60
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov esi, eax
mov dword [ebp - 0x48], 0x61675c
mov dword [ebp - 0x44], esi
mov byte [ebp - 4], 0x27
test edi, edi
je 0x51cbeb
mov edx, dword [edi]
mov ecx, edi
call dword [edx + 4]
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebp - 0x34]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
je 0x51cc2b
mov ebx, dword [ebp - 0x34]
mov byte [ebp - 4], 0x26
mov dword [ebp - 0x48], 0x61675c
test esi, esi
je 0x51cb03
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
mov dword [ebp - 0x44], 0
jmp 0x51cc54
mov byte [ebp - 4], 0x26
mov dword [ebp - 0x48], 0x61675c
test esi, esi
je 0x51cc4c
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
mov dword [ebp - 0x44], 0
jmp 0x51cc52
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
mov byte [ebp - 4], 0x10
mov eax, dword [ebp - 0x88]
mov dword [ebp - 0x8c], 0x61675c
test eax, eax
je 0x51cc79
push eax
call esi
mov dword [ebp - 0x88], 0
or edi, 0xffffffff
mov byte [ebp - 4], 0x2a
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x5c], 0x61675c
test eax, eax
je 0x51cc98
push eax
call esi
mov dword [ebp - 0x58], 0
mov byte [ebp - 4], 0x29
lea eax, [ebp - 0x64]
mov dword [ebp - 0x44], eax
mov byte [ebp - 4], 0x29
mov eax, edi
mov edx, dword [ebp - 0x64]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x51ccc0
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x70]
call fcn.004ea3f0
mov byte [ebp - 4], 0x2d
xor esi, esi
mov ecx, dword [ebp - 0x20]
mov eax, ecx
mov dword [ebp - 0x40], eax
test eax, eax
jle 0x51cd4e
nop
test esi, esi
js 0x51ce03
cmp esi, ecx
jge 0x51ce03
mov eax, dword [ebp - 0x24]
mov edi, dword [eax + esi*4]
mov dword [ebp - 0x44], edi
test edi, edi
je 0x51cd45
mov byte [ebp - 4], 0x2e
lea eax, [edi + 0x258]
mov dword [ebp - 0x7c], eax
mov byte [ebp - 4], 0x2e
mov edx, dword [eax]
or eax, 0xffffffff
sub edx, 0x10
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x51cd28
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x2d
lea ecx, [edi + 0x10]
call fcn.00539b00
push 0x260
push edi
call fcn.00590478
mov ecx, dword [ebp - 0x20]
add esp, 8
inc esi
cmp esi, dword [ebp - 0x40]
jl 0x51cce0
or edi, 0xffffffff
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x51cd69
push eax
call fcn.00597dd8
add esp, 4
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov byte [ebp - 4], 3
mov eax, edi
mov edx, dword [ebp - 0x28]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x51cd95
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 1
mov eax, edi
mov edx, dword [ebp - 0x30]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x51cdb3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x4c]
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], edi
dec edi
test edi, edi
jg 0x51cdd2
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x250]
xor ecx, ebp
call fcn.0059046a
lea esp, [ebp + 0x254]
pop ebp
ret 0x10
push 0x80070057
call fcn.00409920
push 1
push 0xc000008c
call fcn.00412920
push 0x80004005
call fcn.00409920
nop dword [eax]
lodsd eax, dword [esi]
invalid