Function at 0x4787d9
Capabilities:
Check for time delay via gettickcount
Print debug messages

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x4084
call fcn.004a98b0
mov eax, dword [0x4dd52c]
and word [ebp - 0x1018], 0
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x4060], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x4074], eax
mov eax, dword [ebp + 0x18]
push ebx
mov dword [ebp - 0x4068], eax
mov eax, dword [ebp + 0x24]
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x4070], eax
xor eax, eax
cmp dword [ebp + 0x28], 0x9999
mov ecx, 0x3ff
lea edi, [ebp - 0x1016]
rep stosd dword es:[edi], eax
mov dword [ebp - 0x4038], 1
stosw word es:[edi], ax
je 0x478859
movzx di, byte [ebp + 0x29]
push edi
push esi
call fcn.0043e213
mov word [esi + 0x162d0], di
test byte [esi + 0x51df], 1
mov ebx, 0x800
jne 0x478945
push 1
lea eax, [ebp - 0x18]
push eax
push esi
mov byte [ebp - 0x18], 0x85
call fcn.0043dbe6
cmp dword [esi + 0x1dfa8], 1
jne 0x478945
mov eax, dword [esi + 0x1dfac]
test eax, eax
je 0x478945
cmp eax, 3
jb 0x478945
call dword [sym.imp.KERNEL32.dll_GetTickCount]
lea eax, [ebp - 0x4048]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
xor eax, eax
push 0x411a04
mov ecx, 0x400
lea edi, [ebp - 0x1018]
rep stosd dword es:[edi], eax
movzx eax, word [ebp - 0x403a]
push 0x4119d8
push eax
movzx eax, word [ebp - 0x403c]
push eax
movzx eax, word [ebp - 0x403e]
push eax
movzx eax, word [ebp - 0x4040]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push 0x4065a0
lea eax, [ebp - 0x1018]
push ebx
push eax
call fcn.00431bde
add esp, 0x2c
cmp word [esi + 0x1dfa0], 1
lea eax, [ebp - 0x1018]
push eax
jne 0x478927
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x478945
lea edi, [esi + 0x1dfa4]
push 0x4060a8
push dword [edi]
call dword [sym.imp.msvcrt.dll_fwprintf]
push dword [edi]
call dword [sym.imp.msvcrt.dll_fflush]
add esp, 0x10
push dword [ebp - 0x4060]
call sub.GDI32.dll_PATHOBJ_vEnumStart
and dword [ebp - 0x405c], 0
and dword [ebp - 0x4034], 0
lea eax, [ebp - 0x4058]
push eax
push dword [ebp - 0x4060]
call sub.GDI32.dll_PATHOBJ_bEnum
test byte [ebp - 0x4058], 1
mov ecx, dword [ebp - 0x4054]
mov dword [ebp - 0x406c], eax
mov eax, dword [ebp - 0x4050]
mov dword [ebp - 0x4020], eax
mov dword [ebp - 0x4028], ecx
je 0x478c27
mov ecx, dword [eax]
mov eax, dword [eax + 4]
sar eax, 4
sar ecx, 4
push eax
mov dword [ebp - 0x4024], eax
mov dword [ebp - 0x402c], eax
push ecx
lea eax, [esi + 0x5230]
push eax
mov dword [ebp - 0x404c], ecx
mov dword [ebp - 0x4030], ecx
call fcn.004b7420
cmp dword [esi + 0x1dfa8], 1
jne 0x478c14
mov eax, dword [esi + 0x1dfac]
test eax, eax
je 0x478af0
cmp eax, 3
jb 0x478af0
and word [ebp - 0x4018], 0
push dword [ebp - 0x404c]
xor eax, eax
mov ecx, 0x3ff
lea edi, [ebp - 0x4016]
rep stosd dword es:[edi], eax
push 0x4119c0
stosw word es:[edi], ax
lea eax, [ebp - 0x4018]
push ebx
push eax
call fcn.00431bde
add esp, 0x10
cmp dword [esi + 0x1dfa8], 1
jne 0x478c14
mov eax, dword [esi + 0x1dfac]
test eax, eax
je 0x478af0
cmp eax, 3
jb 0x478af0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
lea eax, [ebp - 0x4048]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
xor eax, eax
mov ecx, 0x400
lea edi, [ebp - 0x1018]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x4018]
push eax
movzx eax, word [ebp - 0x403a]
push 0x4119d8
push eax
movzx eax, word [ebp - 0x403c]
push eax
movzx eax, word [ebp - 0x403e]
push eax
movzx eax, word [ebp - 0x4040]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push 0x4065a0
lea eax, [ebp - 0x1018]
push ebx
push eax
call fcn.00431bde
add esp, 0x2c
cmp word [esi + 0x1dfa0], 1
lea eax, [ebp - 0x1018]
push eax
jne 0x478ad2
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x478af0
lea edi, [esi + 0x1dfa4]
push 0x4060a8
push dword [edi]
call dword [sym.imp.msvcrt.dll_fwprintf]
push dword [edi]
call dword [sym.imp.msvcrt.dll_fflush]
add esp, 0x10
cmp dword [esi + 0x1dfa8], 1
jne 0x478c14
mov eax, dword [esi + 0x1dfac]
test eax, eax
je 0x478c14
cmp eax, 3
jb 0x478c14
and word [ebp - 0x2018], 0
push dword [ebp - 0x4024]
xor eax, eax
mov ecx, 0x3ff
lea edi, [ebp - 0x2016]
rep stosd dword es:[edi], eax
push 0x4119a8
stosw word es:[edi], ax
lea eax, [ebp - 0x2018]
push ebx
push eax
call fcn.00431bde
add esp, 0x10
cmp dword [esi + 0x1dfa8], 1
jne 0x478c14
mov eax, dword [esi + 0x1dfac]
test eax, eax
je 0x478c14
cmp eax, 3
jb 0x478c14
call dword [sym.imp.KERNEL32.dll_GetTickCount]
lea eax, [ebp - 0x4048]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
xor eax, eax
mov ecx, 0x400
lea edi, [ebp - 0x1018]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x2018]
push eax
movzx eax, word [ebp - 0x403a]
push 0x4119d8
push eax
movzx eax, word [ebp - 0x403c]
push eax
movzx eax, word [ebp - 0x403e]
push eax
movzx eax, word [ebp - 0x4040]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push 0x4065a0
lea eax, [ebp - 0x1018]
push ebx
push eax
call fcn.00431bde
add esp, 0x2c
cmp word [esi + 0x1dfa0], 1
lea eax, [ebp - 0x1018]
push eax
jne 0x478bf6
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x478c14
lea edi, [esi + 0x1dfa4]
push 0x4060a8
push dword [edi]
call dword [sym.imp.msvcrt.dll_fwprintf]
push dword [edi]
call dword [sym.imp.msvcrt.dll_fflush]
add esp, 0x10
add dword [ebp - 0x4020], 8
dec dword [ebp - 0x4028]
inc dword [ebp - 0x4034]
test byte [ebp - 0x4058], 0x10
je 0x478c44
mov eax, dword [ebp - 0x4028]
push 3
cdq
pop ecx
idiv ecx
test edx, edx
jne 0x479381
cmp dword [ebp + 0x10], 0
je 0x478d6b
cmp dword [ebp - 0x4034], 0x5dc
jl 0x478d6b
mov eax, dword [ebp - 0x4070]
test byte [eax], 1
je 0x478c76
push dword [ebp - 0x4068]
push eax
push esi
call fcn.0044b82e
lea eax, [esi + 0x5230]
push eax
call fcn.004b6ec1
cmp dword [esi + 0x1dfa8], 1
jne 0x478d4c
mov eax, dword [esi + 0x1dfac]
test eax, eax
je 0x478d4c
cmp eax, 3
jb 0x478d4c
call dword [sym.imp.KERNEL32.dll_GetTickCount]
lea eax, [ebp - 0x4048]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
xor eax, eax
push 0x411994
mov ecx, 0x400
lea edi, [ebp - 0x1018]
rep stosd dword es:[edi], eax
movzx eax, word [ebp - 0x403a]
push 0x4119d8
push eax
movzx eax, word [ebp - 0x403c]
push eax
movzx eax, word [ebp - 0x403e]
push eax
movzx eax, word [ebp - 0x4040]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push 0x4065a0
lea eax, [ebp - 0x1018]
push ebx
push eax
call fcn.00431bde
add esp, 0x2c
cmp word [esi + 0x1dfa0], 1
lea eax, [ebp - 0x1018]
push eax
jne 0x478d2e
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x478d4c
lea edi, [esi + 0x1dfa4]
push 0x4060a8
push dword [edi]
call dword [sym.imp.msvcrt.dll_fwprintf]
push dword [edi]
call dword [sym.imp.msvcrt.dll_fflush]
add esp, 0x10
and dword [ebp - 0x405c], 0
and dword [ebp - 0x4034], 0
lea ecx, [esi + 0x5044]
mov eax, dword [ecx]
test al, 4
je 0x478d6b
and eax, 0xfffffffb
mov dword [ecx], eax
mov ecx, dword [ebp - 0x4028]
test ecx, ecx
jle 0x479260
xor eax, eax
inc eax
cmp dword [esi + 0x1df90], eax
mov dword [ebp - 0x405c], eax
jne 0x478f0e
test byte [ebp - 0x4058], 0x10
je 0x478f0e
test byte [ebp - 0x4058], al
mov edi, dword [ebp - 0x4054]
je 0x478daa
dec edi
cmp dword [ebp - 0x4028], edi
jne 0x478e05
push 1
lea eax, [ebp - 0x18]
push eax
push esi
mov byte [ebp - 0x18], 0xc1
call fcn.0043dbe6
push 2
push edi
push esi
call fcn.0043dcbe
push 8
lea eax, [ebp - 0x18]
push eax
push esi
mov byte [ebp - 0x18], 0xf8
mov byte [ebp - 0x17], 0x4d
mov byte [ebp - 0x16], 0xc0
mov byte [ebp - 0x15], 3
mov byte [ebp - 0x14], 0xf8
mov byte [ebp - 0x13], 0x50
mov byte [ebp - 0x12], 0x95
mov byte [ebp - 0x11], 0xfa
call fcn.0043dbe6
push 4
mov eax, edi
shl eax, 2
push eax
push esi
call fcn.0043dcbe
mov ebx, dword [ebp - 0x4020]
mov eax, dword [ebx]
sar eax, 4
sub eax, dword [ebp - 0x4030]
push 2
pop edi
mov word [ebp - 0x401c], ax
push edi
lea eax, [ebp - 0x401c]
push eax
push esi
call fcn.0043dbe6
mov eax, dword [ebx + 4]
sar eax, 4
sub eax, dword [ebp - 0x402c]
push edi
mov word [ebp - 0x401c], ax
lea eax, [ebp - 0x401c]
push eax
push esi
call fcn.0043dbe6
add ebx, 8
mov eax, dword [ebx]
sar eax, 4
sub eax, dword [ebp - 0x4030]
push edi
mov word [ebp - 0x401c], ax
lea eax, [ebp - 0x401c]
push eax
push esi
call fcn.0043dbe6
mov eax, dword [ebx + 4]
sar eax, 4
sub eax, dword [ebp - 0x402c]
push edi
mov word [ebp - 0x401c], ax
lea eax, [ebp - 0x401c]
push eax
push esi
call fcn.0043dbe6
add ebx, 8
mov edi, dword [ebx]
sar edi, 4
mov eax, edi
sub eax, dword [ebp - 0x4030]
push 2
mov word [ebp - 0x401c], ax
lea eax, [ebp - 0x401c]
push eax
push esi
mov dword [ebp - 0x4020], ebx
call fcn.0043dbe6
mov ebx, dword [ebx + 4]
sar ebx, 4
mov eax, ebx
sub eax, dword [ebp - 0x402c]
push 2
mov word [ebp - 0x401c], ax
lea eax, [ebp - 0x401c]
push eax
push esi
call fcn.0043dbe6
add dword [ebp - 0x4020], 8
sub dword [ebp - 0x4028], 3
add dword [ebp - 0x4034], 3
mov dword [ebp - 0x402c], ebx
mov dword [ebp - 0x4030], edi
mov ebx, 0x800
jmp 0x478c44
test byte [ebp - 0x4058], 1
mov eax, dword [ebp - 0x4054]
je 0x478f1e
dec eax
cmp ecx, eax
mov dword [ebp - 0x4024], eax
jne 0x4791b7
and dword [ebp - 0x4038], 0
mov edx, dword [ebp - 0x4020]
xor edi, edi
inc edi
cmp dword [ebp - 0x4028], edi
jne 0x478f82
mov ecx, dword [edx]
sar ecx, 4
sub ecx, dword [ebp - 0x4030]
test cx, cx
jge 0x478f56
neg ecx
mov eax, dword [edx + 4]
sar eax, 4
sub eax, dword [ebp - 0x402c]
test ax, ax
jge 0x478f69
neg eax
cmp cx, 0x7f
jg 0x479005
cmp ax, 0x7f
jle 0x47900b
jmp 0x479005
mov ecx, dword [ebp - 0x402c]
and dword [ebp - 0x404c], 0
cmp dword [ebp - 0x4024], 0
mov eax, dword [ebp - 0x4030]
mov dword [ebp - 0x4078], ecx
jle 0x47900b
mov ecx, dword [edx]
sar ecx, 4
mov dword [ebp - 0x4064], ecx
sub ecx, eax
test cx, cx
jge 0x478fb8
neg ecx
mov edi, dword [edx + 4]
sar edi, 4
mov eax, edi
sub eax, dword [ebp - 0x4078]
test ax, ax
jge 0x478fcd
neg eax
cmp cx, 0x7f
jg 0x479002
cmp ax, 0x7f
jg 0x479002
mov eax, dword [ebp - 0x4064]
add edx, 8
inc dword [ebp - 0x404c]
movsx ecx, word [ebp - 0x404c]
cmp ecx, dword [ebp - 0x4024]
mov dword [ebp - 0x4078], edi
jl 0x478fa4
xor edi, edi
inc edi
jmp 0x47900b
xor edi, edi
inc edi
mov dword [ebp - 0x4038], edi
push edi
lea eax, [ebp - 0x18]
push eax
push esi
mov byte [ebp - 0x18], 0xc1
call fcn.0043dbe6
push 2
push dword [ebp - 0x4024]
push esi
call fcn.0043dcbe
cmp dword [ebp - 0x4038], edi
mov byte [ebp - 0x18], 0xf8
sete al
cmp dword [esi + 0x1dfa8], edi
mov byte [ebp - 0x17], 0x4d
mov byte [ebp - 0x16], 0xc0
mov byte [ebp - 0x14], 0xf8
mov byte [ebp - 0x13], 0x50
mov byte [ebp - 0x12], 0x9d
lea eax, [eax + eax + 1]
mov byte [ebp - 0x15], al
jne 0x479173
mov eax, dword [esi + 0x1dfac]
test eax, eax
je 0x479173
cmp eax, 3
jb 0x479173
and word [ebp - 0x3018], 0
push dword [ebp - 0x4024]
xor eax, eax
mov ecx, 0x3ff
lea edi, [ebp - 0x3016]
rep stosd dword es:[edi], eax
push 0x411970
stosw word es:[edi], ax
lea eax, [ebp - 0x3018]
push ebx
push eax
call fcn.00431bde
add esp, 0x10
cmp dword [esi + 0x1dfa8], 1
jne 0x479173
mov eax, dword [esi + 0x1dfac]
test eax, eax
je 0x479173
cmp eax, 3
jb 0x479173
call dword [sym.imp.KERNEL32.dll_GetTickCount]
lea eax, [ebp - 0x4048]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
xor eax, eax
mov ecx, 0x400
lea edi, [ebp - 0x1018]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x3018]
push eax
movzx eax, word [ebp - 0x403a]
push 0x4119d8
push eax
movzx eax, word [ebp - 0x403c]
push eax
movzx eax, word [ebp - 0x403e]
push eax
movzx eax, word [ebp - 0x4040]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push 0x4065a0
lea eax, [ebp - 0x1018]
push ebx
push eax
call fcn.00431bde
add esp, 0x2c
cmp word [esi + 0x1dfa0], 1
lea eax, [ebp - 0x1018]
push eax
jne 0x479155
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x479173
lea edi, [esi + 0x1dfa4]
push 0x4060a8
push dword [edi]
call dword [sym.imp.msvcrt.dll_fwprintf]
push dword [edi]
call dword [sym.imp.msvcrt.dll_fflush]
add esp, 0x10
cmp dword [ebp - 0x4038], 1
mov edi, dword [ebp - 0x4024]
jne 0x479187
shl edi, 2
jmp 0x479189
add edi, edi
cmp edi, 0x100
push 8
lea eax, [ebp - 0x18]
push eax
push esi
jge 0x4791a5
mov byte [ebp - 0x11], 0xfb
call fcn.0043dbe6
push 1
jmp 0x4791b0
mov byte [ebp - 0x11], 0xfa
call fcn.0043dbe6
push 4
push edi
push esi
call fcn.0043dcbe
mov eax, dword [ebp - 0x4020]
mov eax, dword [eax]
sar eax, 4
mov dword [ebp - 0x4084], eax
sub eax, dword [ebp - 0x4030]
cmp dword [ebp - 0x4038], 1
jne 0x4791ef
mov word [ebp - 0x401c], ax
push 2
lea eax, [ebp - 0x401c]
push eax
push esi
call fcn.0043dbe6
jmp 0x4791f8
push 1
push eax
push esi
call fcn.0043dcbe
mov eax, dword [ebp - 0x4020]
mov edi, dword [eax + 4]
sar edi, 4
mov eax, edi
sub eax, dword [ebp - 0x402c]
cmp dword [ebp - 0x4038], 1
jne 0x47922d
mov word [ebp - 0x401c], ax
push 2
lea eax, [ebp - 0x401c]
push eax
push esi
call fcn.0043dbe6
jmp 0x479236
push 1
push eax
push esi
call fcn.0043dcbe
add dword [ebp - 0x4020], 8
mov eax, dword [ebp - 0x4084]
dec dword [ebp - 0x4028]
inc dword [ebp - 0x4034]
mov dword [ebp - 0x4030], eax
mov dword [ebp - 0x402c], edi
jmp 0x478c44
test byte [ebp - 0x4058], 2
je 0x479350
test byte [ebp - 0x4058], 8
je 0x479350
lea eax, [esi + 0x5230]
push eax
call fcn.004b6d1f
cmp dword [esi + 0x1dfa8], 1
jne 0x479350
mov eax, dword [esi + 0x1dfac]
test eax, eax
je 0x479350
cmp eax, 3
jb 0x479350
call dword [sym.imp.KERNEL32.dll_GetTickCount]
lea eax, [ebp - 0x4048]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
xor eax, eax
push 0x411954
mov ecx, 0x400
lea edi, [ebp - 0x1018]
rep stosd dword es:[edi], eax
movzx eax, word [ebp - 0x403a]
push 0x4119d8
push eax
movzx eax, word [ebp - 0x403c]
push eax
movzx eax, word [ebp - 0x403e]
push eax
movzx eax, word [ebp - 0x4040]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push 0x4065a0
lea eax, [ebp - 0x1018]
push ebx
push eax
call fcn.00431bde
add esp, 0x2c
cmp word [esi + 0x1dfa0], 1
lea eax, [ebp - 0x1018]
push eax
jne 0x479332
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x479350
lea edi, [esi + 0x1dfa4]
push 0x4060a8
push dword [edi]
call dword [sym.imp.msvcrt.dll_fwprintf]
push dword [edi]
call dword [sym.imp.msvcrt.dll_fflush]
add esp, 0x10
cmp dword [ebp - 0x406c], 0
jne 0x47895e
mov eax, dword [ebp - 0x4074]
test eax, eax
je 0x47936f
mov ecx, dword [ebp - 0x405c]
mov dword [eax], ecx
xor eax, eax
inc eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.004a9585
leave
ret 0x24
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x479372