Function at 0x407cbc
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
and dword [ebp - 8], 0
and dword [ebp - 0x38], 0
push ebx
mov ebx, ecx
mov eax, dword [ebx + 0x68]
push esi
push edi
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x34], eax
and dword [ebp - 0x18], 0
cmp byte [ebp + 0x28], 0
mov dword [ebp - 0x20], bind
je 0x407cf3
cmp dword [ebp + 0x20], 0xffffffff
je 0x407e82
mov eax, dword [ebx + 0x68]
xor edi, edi
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x1c], bind
cmp dword [ebp - 0x34], eax
je 0x407d1e
mov ecx, dword [ebx + 0x60]
push 0x403282
push 4
mov edx, eax
call fcn.00433e45
mov eax, dword [ebx + 0x68]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x24], edi
cmp eax, edi
je 0x407e69
mov eax, dword [ebx + 0x60]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
mov esi, dword [eax]
cmp dword [esi + 8], 0
je 0x407db7
mov ecx, dword [esi]
mov edx, dword [ebp + 8]
mov eax, ecx
shr eax, 3
mov al, byte [eax + edx]
and cl, 7
shr al, cl
test al, 1
je 0x407db7
cmp dword [ebp + 0xc], 0
je 0x407d7c
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 8]
mov edi, dword [eax]
push ecx
push 0
mov edx, esi
mov ecx, edi
call fcn.00403019
mov ecx, dword [ebp + 0xc]
cmp eax, dword [ecx + 8]
je 0x407db4
mov ecx, dword [esi]
cmp ecx, dword [edi + eax*4]
jne 0x407db4
mov edi, dword [ebp - 0x2c]
mov eax, dword [esi]
cmp eax, dword [ebp + 0x20]
je 0x407e65
mov ecx, dword [ebx + 0x30]
movzx ecx, word [ecx + eax*2]
mov eax, dword [esi + 8]
cmp eax, dword [esi + 0x14]
je 0x407da5
movzx eax, byte [esi + 0x20]
movzx edx, byte [ebp + 0x1c]
xor eax, edx
shl eax, 0x10
or ecx, eax
cmp ecx, dword [ebp - 0x1c]
jge 0x407db7
mov edi, esi
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x2c], edi
jmp 0x407db7
mov edi, dword [ebp - 0x2c]
inc dword [ebp - 0x24]
mov eax, dword [ebx + 0x68]
add dword [ebp - 0x28], 4
cmp dword [ebp - 0x24], eax
jne 0x407d2f
test edi, edi
je 0x407e69
test dword [ebp - 0x1c], 0xffff0000
jne 0x407e7f
movzx ecx, byte [0x47a17c]
cmp eax, ecx
jae 0x407e29
movzx eax, byte [0x47a17d]
cmp dword [ebx + 0x10], eax
jb 0x407e29
mov eax, dword [0x482c44]
sub eax, dword [edi + 0x10]
cmp eax, 0x1e
jae 0x407e29
cmp byte [0x47a184], 0
jne 0x407e29
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
mov ecx, dword [ebp + 0x24]
sub eax, dword [ecx]
cmp eax, 0x2710
jbe 0x407e29
mov eax, dword [ebp - 0x1c]
and eax, 0xffff
dec eax
jne 0x407e79
cmp dword [ebp + 0x2c], 0
jg 0x407e7f
mov esi, dword [ebp - 8]
mov eax, dword [ebp + 0x18]
push 0
push 0
sub eax, esi
push eax
mov eax, esi
imul eax, eax, 0x14
add eax, dword [ebp + 0x10]
mov ecx, ebx
push eax
push dword [ebp + 0x1c]
push edi
call fcn.0040387d
add esi, eax
mov dword [ebp - 8], esi
cmp esi, dword [ebp + 0x14]
jb 0x407cf3
mov eax, esi
jmp 0x40804a
mov edi, esi
jmp 0x407e29
test byte [ebx + 0x3e], 8
jne 0x40842d
and dword [ebp - 0x18], 0
jmp 0x407e82
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x18], edi
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
mov ecx, dword [ebp + 0x24]
and dword [ebp - 0x30], 0
mov dword [ecx], eax
mov esi, dword [ebx + 0xc]
mov eax, esi
cmp esi, 0x800
jae 0x407eaa
shl eax, 2
call section..text
mov edi, esp
jmp 0x407ec4
xor ecx, ecx
push 4
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00435115
mov edi, eax
pop ecx
mov dword [ebp - 0x30], edi
mov edx, dword [ebp - 0x20]
xor esi, esi
mov dword [ebp - 0x28], edx
cmp dword [ebp + 0xc], esi
je 0x407f5c
mov eax, dword [ebp + 0xc]
push dword [eax + 8]
mov ecx, dword [eax]
push esi
lea edx, [ebp - 0x38]
call fcn.00403019
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x2c], eax
cmp eax, dword [ecx + 8]
jae 0x407fff
mov ecx, dword [ebp + 0xc]
mov ecx, dword [ecx]
mov eax, dword [ecx + eax*4]
mov ecx, dword [ebp + 8]
mov edx, eax
shr edx, 3
mov cl, byte [edx + ecx]
mov dword [ebp - 0x1c], eax
and eax, 7
mov byte [ebp - 1], cl
mov dword [ebp - 0x24], eax
mov cl, al
mov al, byte [ebp - 1]
shr al, cl
test al, 1
je 0x407f48
mov eax, dword [ebx + 0x28]
mov al, byte [edx + eax]
mov cl, byte [ebp - 0x24]
shr al, cl
test al, 1
je 0x407f48
mov eax, dword [ebx + 0x30]
mov ecx, dword [ebp - 0x1c]
lea eax, [eax + ecx*2]
mov dword [edi + esi*4], eax
inc esi
cmp byte [0x47a184], 0
jne 0x408209
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp + 0xc]
inc eax
mov dword [ebp - 0x2c], eax
cmp eax, dword [ecx + 8]
jb 0x407ef5
jmp 0x408209
mov eax, dword [ebx + 0xc]
mov ecx, dword [ebp + 8]
or dword [ebp - 0x10], 0xffffffff
add eax, 7
shr eax, 3
cmp byte [0x47a184], 0
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebx + 0x28]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x28], ecx
je 0x408081
test eax, eax
jle 0x407fff
and dword [ebp - 0x2c], 0
sub ecx, dword [ebp + 8]
mov dword [ebp - 0x28], ecx
mov esi, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x28]
mov cl, byte [ecx + esi]
and cl, byte [esi]
je 0x407ff0
mov eax, dword [ebx + 0x30]
add eax, dword [ebp - 0x2c]
test cl, 1
jne 0x408054
test cl, 2
jne 0x40805e
test cl, 4
jne 0x408063
test cl, 8
jne 0x408068
test cl, 0x10
jne 0x40806d
test cl, 0x20
jne 0x408072
test cl, 0x40
jne 0x408077
test cl, cl
js 0x40807c
mov eax, dword [ebp - 0x1c]
inc dword [ebp - 0x14]
add dword [ebp - 0x2c], 0x10
dec eax
mov dword [ebp - 0x1c], eax
test eax, eax
jg 0x407f93
push dword [ebp - 0x30]
call fcn.004349f9
xor eax, eax
pop ecx
cmp dword [ebp - 0x18], eax
je 0x408047
cmp dword [ebp + 0x2c], eax
push eax
setg al
movzx eax, al
push eax
mov eax, dword [ebp + 0x18]
sub eax, dword [ebp - 8]
mov ecx, ebx
push eax
mov eax, dword [ebp - 8]
imul eax, eax, 0x14
add eax, dword [ebp + 0x10]
push eax
push dword [ebp + 0x1c]
push dword [ebp - 0x18]
call fcn.0040387d
add dword [ebp - 8], eax
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 0x14]
jb 0x407cd8
mov eax, dword [ebp - 8]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
leave
ret 0x30
xor esi, esi
mov dword [edi], eax
inc esi
jmp 0x408214
add eax, 2
jmp 0x408054
add eax, 4
jmp 0x408054
add eax, 6
jmp 0x408054
add eax, 8
jmp 0x408054
add eax, 0xa
jmp 0x408054
add eax, 0xc
jmp 0x408054
add eax, 0xe
jmp 0x408054
movzx ecx, byte [0x47a17d]
cmp dword [ebx + 0x10], ecx
jae 0x408094
mov dword [ebp - 0x10], 0xfffff000
test eax, eax
jle 0x407fff
and dword [ebp - 0x2c], 0
mov eax, dword [ebp - 0x28]
mov al, byte [eax]
mov ecx, dword [ebp - 0x14]
and al, byte [ecx]
mov byte [ebp - 1], al
je 0x4081ef
mov eax, dword [ebx + 0x30]
add eax, dword [ebp - 0x2c]
test byte [ebp - 1], 1
je 0x4080dc
movzx ecx, word [eax]
and ecx, dword [ebp - 0x10]
cmp ecx, edx
jg 0x4080dc
xor ebx, ebx
cmp edx, ecx
setne bl
mov edx, ecx
dec ebx
and esi, ebx
mov ebx, dword [ebp - 0xc]
mov dword [edi + esi*4], eax
inc esi
test byte [ebp - 1], 2
je 0x408103
movzx ecx, word [eax + 2]
and ecx, dword [ebp - 0x10]
cmp ecx, edx
jg 0x408103
xor ebx, ebx
cmp edx, ecx
setne bl
mov edx, ecx
lea ecx, [eax + 2]
dec ebx
and esi, ebx
mov ebx, dword [ebp - 0xc]
mov dword [edi + esi*4], ecx
inc esi
test byte [ebp - 1], 4
je 0x40812a
movzx ecx, word [eax + 4]
and ecx, dword [ebp - 0x10]
cmp ecx, edx
jg 0x40812a
xor ebx, ebx
cmp edx, ecx
setne bl
mov edx, ecx
lea ecx, [eax + 4]
dec ebx
and esi, ebx
mov ebx, dword [ebp - 0xc]
mov dword [edi + esi*4], ecx
inc esi
test byte [ebp - 1], 8
je 0x408151
movzx ecx, word [eax + 6]
and ecx, dword [ebp - 0x10]
cmp ecx, edx
jg 0x408151
xor ebx, ebx
cmp edx, ecx
setne bl
mov edx, ecx
lea ecx, [eax + 6]
dec ebx
and esi, ebx
mov ebx, dword [ebp - 0xc]
mov dword [edi + esi*4], ecx
inc esi
test byte [ebp - 1], 0x10
je 0x408178
movzx ecx, word [eax + 8]
and ecx, dword [ebp - 0x10]
cmp ecx, edx
jg 0x408178
xor ebx, ebx
cmp edx, ecx
setne bl
mov edx, ecx
lea ecx, [eax + 8]
dec ebx
and esi, ebx
mov ebx, dword [ebp - 0xc]
mov dword [edi + esi*4], ecx
inc esi
test byte [ebp - 1], 0x20
je 0x40819f
movzx ecx, word [eax + 0xa]
and ecx, dword [ebp - 0x10]
cmp ecx, edx
jg 0x40819f
xor ebx, ebx
cmp edx, ecx
setne bl
mov edx, ecx
lea ecx, [eax + 0xa]
dec ebx
and esi, ebx
mov ebx, dword [ebp - 0xc]
mov dword [edi + esi*4], ecx
inc esi
test byte [ebp - 1], 0x40
je 0x4081c6
movzx ecx, word [eax + 0xc]
and ecx, dword [ebp - 0x10]
cmp ecx, edx
jg 0x4081c6
xor ebx, ebx
cmp edx, ecx
setne bl
mov edx, ecx
lea ecx, [eax + 0xc]
dec ebx
and esi, ebx
mov ebx, dword [ebp - 0xc]
mov dword [edi + esi*4], ecx
inc esi
test byte [ebp - 1], 0x80
je 0x4081ef
add eax, 0xe
movzx ecx, word [eax]
and ecx, dword [ebp - 0x10]
mov dword [ebp - 0x24], eax
cmp ecx, edx
jg 0x4081ef
xor eax, eax
cmp edx, ecx
setne al
mov edx, ecx
dec eax
and esi, eax
mov eax, dword [ebp - 0x24]
mov dword [edi + esi*4], eax
inc esi
inc dword [ebp - 0x14]
add dword [ebp - 0x2c], 0x10
inc dword [ebp - 0x28]
dec dword [ebp - 0x1c]
cmp dword [ebp - 0x1c], 0
jg 0x4080a0
mov dword [ebp - 0x28], edx
test esi, esi
je 0x407fff
mov edx, dword [ebp - 0x28]
test dword [ebp - 0x20], 0xffff0000
jne 0x40822c
and edx, 0xfff
cmp edx, 5
jge 0x407fff
cmp dword [ebp - 0x18], 0
je 0x408240
mov eax, dword [edi]
movzx eax, word [eax]
cmp dword [ebp - 0x20], eax
je 0x407fff
cmp dword [ebp + 0x2c], 1
jg 0x408290
call fcn.004338ca
xor edx, edx
div esi
mov ecx, ebx
mov eax, dword [edi + edx*4]
sub eax, dword [ebx + 0x30]
sar eax, 1
push eax
call fcn.0040665d
cmp dword [ebp + 0x2c], 0
push 0
setg cl
movzx ecx, cl
push ecx
mov ecx, dword [ebp + 0x18]
sub ecx, dword [ebp - 8]
push ecx
mov ecx, dword [ebp - 8]
imul ecx, ecx, 0x14
add ecx, dword [ebp + 0x10]
push ecx
push dword [ebp + 0x1c]
mov ecx, ebx
push eax
call fcn.0040387d
add dword [ebp - 8], eax
jmp 0x408413
and dword [ebp - 0x1c], 0
call fcn.004338ca
xor edx, edx
mov ecx, esi
sub ecx, dword [ebp - 0x1c]
div ecx
mov ecx, dword [ebp - 0x1c]
add edx, ecx
inc dword [ebp - 0x1c]
lea ecx, [edi + ecx*4]
lea eax, [edi + edx*4]
mov edx, dword [ecx]
mov dword [ebp - 0x2c], edx
mov edx, dword [eax]
mov dword [ecx], edx
mov ecx, dword [ebp - 0x2c]
mov dword [eax], ecx
cmp dword [ebp - 0x1c], esi
jne 0x408294
or dword [ebp - 0x1c], 0xffffffff
and dword [ebp - 0x10], 0
and dword [ebp - 0x2c], 0
test esi, esi
jbe 0x4083ac
mov eax, dword [ebp - 0x2c]
mov eax, dword [edi + eax*4]
sub eax, dword [ebx + 0x30]
xor ecx, ecx
inc ecx
sar eax, 1
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x14], ecx
lea ecx, [eax - 1]
test ecx, ecx
jl 0x408320
mov ebx, dword [ebx + 0x28]
mov dword [ebp - 0x24], ecx
mov edx, ecx
sar edx, 3
mov dl, byte [edx + ebx]
and cl, 7
shr dl, cl
test dl, 1
je 0x40831d
mov ecx, dword [ebp - 0x14]
cmp ecx, dword [ebp + 0x2c]
jge 0x40831d
inc dword [ebp - 0x14]
dec dword [ebp - 0x24]
mov ecx, dword [ebp - 0x24]
jns 0x4082f8
mov ebx, dword [ebp - 0xc]
dec dword [ebp - 0x14]
lea ecx, [eax + 1]
cmp ecx, dword [ebx + 0xc]
jae 0x40835f
mov edx, dword [ebx + 0x28]
mov dword [ebp - 0x24], ecx
mov ecx, dword [ebp - 0x24]
mov ebx, ecx
sar ebx, 3
mov bl, byte [ebx + edx]
and cl, 7
shr bl, cl
test bl, 1
mov ebx, dword [ebp - 0xc]
je 0x40835f
mov ecx, dword [ebp - 0x28]
cmp ecx, dword [ebp + 0x2c]
jge 0x40835f
inc dword [ebp - 0x28]
inc dword [ebp - 0x24]
mov ecx, dword [ebp - 0x24]
cmp ecx, dword [ebx + 0xc]
jb 0x408331
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x28]
add ecx, edx
cmp ecx, dword [ebp - 0x10]
jbe 0x408375
sub eax, dword [ebp - 0x14]
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0x2c]
cmp dword [ebp - 0x10], eax
ja 0x40838d
je 0x4083ac
inc dword [ebp - 0x2c]
cmp dword [ebp - 0x2c], esi
jb 0x4082d7
jmp 0x4083ac
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp + 0x2c]
cdq
idiv ecx
mov eax, ecx
sub eax, edx
cdq
idiv ecx
mov eax, dword [ebp - 0x10]
sub eax, edx
cmp eax, ecx
jb 0x4083a9
add dword [ebp - 0x1c], edx
mov dword [ebp - 0x10], ecx
mov esi, dword [ebp - 8]
mov eax, dword [ebp - 0x1c]
imul esi, esi, 0x14
add esi, dword [ebp + 0x10]
mov dword [esi], eax
xor eax, eax
mov dword [esi + 8], eax
mov dword [esi + 4], eax
mov dword [esi + 0xc], eax
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x10], eax
jbe 0x408410
mov eax, dword [ebp + 0x18]
sub eax, dword [ebp - 8]
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x2c]
add eax, ecx
push eax
mov ecx, ebx
call fcn.0040665d
mov cl, byte [ebp + 0x1c]
push 0
push 1
push dword [ebp - 0x28]
mov byte [eax + 0x20], cl
lea ecx, [ebp - 0x4c]
push ecx
push eax
mov ecx, ebx
call fcn.0040356b
mov eax, dword [ebp - 0x40]
add dword [esi + 0xc], eax
inc dword [ebp - 0x2c]
mov eax, dword [ebp - 0x2c]
cmp eax, dword [ebp - 0x10]
jb 0x4083d6
inc dword [ebp - 8]
mov esi, dword [ebp - 8]
cmp esi, dword [ebp + 0x14]
jb 0x407ec4
push dword [ebp - 0x30]
call fcn.004349f9
pop ecx
jmp 0x407e5e
push dword [ebp + 0x10]
mov ecx, ebx
push dword [ebp + 8]
call fcn.0040374e
jmp 0x40804a