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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x2040
call fcn.004a98b0
mov eax, dword [0x4dd52c]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 0x1f7a4]
push edi
xor edx, edx
mov dword [ebp - 0x2020], eax
xor eax, eax
mov byte [ebp - 0xc], dl
lea edi, [ebp - 0xb]
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov word [ebp - 0x100c], dx
xor eax, eax
mov ecx, 0x3ff
lea edi, [ebp - 0x100a]
rep stosd dword es:[edi], eax
push 0x2000
push edx
mov dword [ebp - 0x2030], edx
mov dword [ebp - 0x2024], edx
mov dword [ebp - 0x202c], edx
stosw word es:[edi], ax
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
xor ecx, ecx
cmp eax, ecx
mov dword [ebp - 0x2014], eax
jne 0x487434
xor eax, eax
jmp 0x487934
push ecx
push ecx
push ecx
push dword [esi + 0x8148]
call fcn.004809d9
mov ax, word [esi + 0x8a36]
push esi
mov word [ebp - 0x201c], ax
call fcn.0048b57c
cmp eax, 1
jne 0x487461
dec dword [ebp - 0x201c]
cmp word [esi + 0x1bf2a], 2
jne 0x487473
mov edi, dword [esi + 0x8158]
jmp 0x487479
mov edi, dword [esi + 0x3eb8]
push edi
lea eax, [ebp - 0x2030]
push eax
lea eax, [ebp - 0x2024]
push eax
lea eax, [ebp - 0x201c]
push eax
push esi
call fcn.00486ef4
push esi
call fcn.0048b57c
test eax, eax
jne 0x48752a
cmp word [ebp - 0x2024], ax
jne 0x4874bf
push edi
push dword [ebp - 0x2014]
push dword [ebp - 0x2020]
push esi
call fcn.0048b41c
cmp word [esi + 0x1bf2a], 2
jne 0x48752a
push dword [esi + 0x816c]
lea eax, [ebp - 0xc]
push 0x40bdcc
push eax
call dword [sym.imp.msvcrt.dll_sprintf]
lea eax, [ebp - 0xc]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4874e7
sub eax, edx
lea ecx, [ebp - 0x202c]
push ecx
push eax
lea eax, [ebp - 0xc]
push eax
push dword [esi + 4]
lea eax, [esi + 0x1f778]
push eax
call fcn.00480a26
mov eax, dword [esi + 0x3eb8]
sub eax, dword [esi + 0x8158]
push eax
push dword [ebp - 0x2014]
push dword [ebp - 0x2020]
push esi
call fcn.0048b41c
movsx eax, word [ebp - 0x201c]
and dword [ebp - 0x2018], 0
test eax, eax
jle 0x4878d7
xor eax, eax
inc eax
cmp dword [esi + 0x3ea8], eax
mov dword [ebp - 0x2028], eax
jl 0x487598
lea edi, [esi + 0x3eb8]
push 0
push dword [edi + 4]
push dword [edi]
push dword [esi + 0x8148]
call fcn.004809d9
mov eax, dword [edi + 8]
sub eax, dword [edi]
push eax
push dword [ebp - 0x2014]
push dword [ebp - 0x2020]
push esi
call fcn.0048b41c
inc dword [ebp - 0x2028]
mov eax, dword [ebp - 0x2028]
add edi, 8
cmp eax, dword [esi + 0x3ea8]
jle 0x487557
cmp word [ebp - 0x2024], 0
je 0x48762f
movsx eax, word [ebp - 0x2030]
dec eax
cmp dword [ebp - 0x2018], eax
jne 0x48762f
cmp word [esi + 0x1bf2a], 2
jne 0x48761d
push dword [esi + 0x8158]
push dword [ebp - 0x2024]
push esi
call fcn.00486dfa
lea eax, [ebp - 0xc]
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4875d8
sub eax, edi
lea ecx, [ebp - 0x202c]
push ecx
push eax
lea eax, [ebp - 0xc]
push eax
push dword [esi + 4]
lea eax, [esi + 0x1f778]
push eax
call fcn.00480a26
mov eax, dword [esi + 0x3eb8]
sub eax, dword [esi + 0x8158]
push eax
push dword [ebp - 0x2014]
push dword [ebp - 0x2020]
push esi
call fcn.0048b41c
jmp 0x48762f
push dword [esi + 0x3eb8]
push dword [ebp - 0x2024]
push esi
call fcn.00486dfa
mov eax, dword [esi + 0x1f7a4]
push dword [eax + 0x1e7ec]
push eax
push esi
call fcn.00483231
test ebx, ebx
mov byte [ebp - 0x200d], al
je 0x48777c
cmp dword [ebx + 0x1dfa8], 1
jne 0x48777c
mov eax, dword [ebx + 0x1dfac]
test eax, eax
je 0x48777c
cmp eax, 3
jb 0x48777c
and word [ebp - 0x200c], 0
push dword [ebp - 0x2018]
xor eax, eax
mov ecx, 0x3ff
lea edi, [ebp - 0x200a]
rep stosd dword es:[edi], eax
push 0x413620
stosw word es:[edi], ax
lea eax, [ebp - 0x200c]
push 0x800
push eax
call fcn.00431bde
add esp, 0x10
cmp dword [ebx + 0x1dfa8], 1
jne 0x48777c
mov eax, dword [ebx + 0x1dfac]
test eax, eax
je 0x48777c
cmp eax, 3
jb 0x48777c
call dword [sym.imp.KERNEL32.dll_GetTickCount]
lea eax, [ebp - 0x2040]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
xor eax, eax
mov ecx, 0x400
lea edi, [ebp - 0x100c]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x200c]
push eax
movzx eax, word [ebp - 0x2032]
push 0x412a74
push eax
movzx eax, word [ebp - 0x2034]
push eax
movzx eax, word [ebp - 0x2036]
push eax
movzx eax, word [ebp - 0x2038]
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 - 0x100c]
push 0x800
push eax
call fcn.00431bde
add esp, 0x2c
cmp word [ebx + 0x1dfa0], 1
lea eax, [ebp - 0x100c]
push eax
jne 0x48775e
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x48777c
lea edi, [ebx + 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 byte [ebp - 0x200d], 2
je 0x4877a3
movsx eax, word [ebp - 0x201c]
inc dword [ebp - 0x2018]
cmp dword [ebp - 0x2018], eax
jl 0x487540
jmp 0x4878d7
test ebx, ebx
je 0x4878d7
cmp dword [ebx + 0x1dfa8], 1
jne 0x4878d7
mov eax, dword [ebx + 0x1dfac]
test eax, eax
je 0x4878d7
cmp eax, 3
jb 0x4878d7
and word [ebp - 0x200c], 0
push dword [ebp - 0x2018]
xor eax, eax
mov ecx, 0x3ff
lea edi, [ebp - 0x200a]
rep stosd dword es:[edi], eax
push 0x413590
stosw word es:[edi], ax
lea eax, [ebp - 0x200c]
push 0x800
push eax
call fcn.00431bde
add esp, 0x10
cmp dword [ebx + 0x1dfa8], 1
jne 0x4878d7
mov eax, dword [ebx + 0x1dfac]
test eax, eax
je 0x4878d7
cmp eax, 3
jb 0x4878d7
call dword [sym.imp.KERNEL32.dll_GetTickCount]
lea eax, [ebp - 0x2040]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
xor eax, eax
mov ecx, 0x400
lea edi, [ebp - 0x100c]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x200c]
push eax
movzx eax, word [ebp - 0x2032]
push 0x412a74
push eax
movzx eax, word [ebp - 0x2034]
push eax
movzx eax, word [ebp - 0x2036]
push eax
movzx eax, word [ebp - 0x2038]
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 - 0x100c]
push 0x800
push eax
call fcn.00431bde
add esp, 0x2c
cmp word [ebx + 0x1dfa0], 1
lea eax, [ebp - 0x100c]
push eax
jne 0x4878b9
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x4878d7
add ebx, 0x1dfa4
push 0x4060a8
push dword [ebx]
call dword [sym.imp.msvcrt.dll_fwprintf]
push dword [ebx]
call dword [sym.imp.msvcrt.dll_fflush]
add esp, 0x10
push esi
call fcn.0048b57c
test eax, eax
jne 0x487925
push eax
lea edi, [esi + 0x3ea8]
mov eax, dword [edi]
push dword [esi + eax*8 + 0x3ebc]
push dword [esi + eax*8 + 0x3eb8]
push dword [esi + 0x8148]
call fcn.004809d9
mov eax, dword [edi]
mov ecx, dword [esi + 0x3eb0]
sub ecx, dword [esi + eax*8 + 0x3eb8]
push ecx
push dword [ebp - 0x2014]
push dword [ebp - 0x2020]
push esi
call fcn.0048b41c
push dword [ebp - 0x2014]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
inc eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.004a9585
leave
ret 8