Function at 0x403f30
Capabilities:
Check for time delay via gettickcount
Check if file exists
Get file attributes
Get file size

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x30
push ebx
push ebp
push esi
mov esi, ecx
mov eax, dword [esi + 0x5c]
push edi
xor edi, edi
cmp eax, edi
mov dword [esp + 0x18], esi
jne 0x403f5b
call fcn.00403740
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [esi + 0x1c]
push eax
mov dword [esp + 0x30], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0xc]
add esi, 8
cmp eax, edi
jne 0x403f79
mov dword [esp + 0x24], edi
jmp 0x403f93
mov ecx, dword [esi + 8]
sub ecx, eax
mov eax, 0x66666667
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x24], eax
cmp dword [esp + 0x24], edi
mov dword [esp + 0x20], edi
jle 0x40448d
xor ebx, ebx
mov dword [esp + 0x1c], ebx
jmp 0x403fb0
mov ebp, dword [esi + 4]
test ebp, ebp
je 0x404437
mov ecx, dword [esi + 8]
sub ecx, ebp
mov eax, 0x66666667
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, edi
jbe 0x404437
mov eax, dword [ebx + ebp + 4]
test eax, eax
jne 0x4042ae
test ebp, ebp
mov dword [esp + 0x14], 0
je 0x404437
mov ecx, dword [esi + 8]
sub ecx, ebp
mov eax, 0x66666667
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, edi
jbe 0x404437
mov ebp, dword [ebx + ebp]
push 0
push 0x80
push 3
push 0
push 1
push bind
push ebp
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
mov eax, dword [0x41c4d0]
test eax, eax
je 0x404099
cmp ebx, 0xffffffff
jne 0x4040a2
mov ebx, dword [esp + 0x18]
push ebp
mov ecx, ebx
call fcn.004022b0
test eax, eax
je 0x404230
push edi
mov ecx, esi
call fcn.00402a30
mov eax, dword [eax]
push eax
mov ecx, ebx
call fcn.004022f0
test eax, eax
je 0x404230
push 0
push 0x80
push 3
push 0
push 3
push bind
push ebp
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x404230
mov dword [esp + 0x14], 1
cmp ebx, 0xffffffff
je 0x404230
test byte [0x41c51c], 1
je 0x4042cb
mov eax, dword [0x41c4d0]
test eax, eax
je 0x4040dc
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x4040dc
mov ecx, dword [esp + 0x18]
push ebp
call fcn.004022b0
test eax, eax
je 0x4040dc
mov ecx, dword [esp + 0x18]
push ebp
call fcn.004022f0
mov dword [esp + 0x14], eax
mov ebp, dword [esi + 4]
test ebp, ebp
je 0x404437
mov ecx, dword [esi + 8]
sub ecx, ebp
mov eax, 0x66666667
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, edi
jbe 0x404437
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx + ebp + 0x1c]
test eax, eax
jne 0x40415e
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x40415e
lea edx, [esp + 0x3c]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push edi
mov ecx, esi
mov dword [esp + 0x3c], eax
call fcn.00402a30
mov ecx, dword [esp + 0x38]
mov dword [eax + 0x20], ecx
mov edx, dword [esp + 0x3c]
mov dword [eax + 0x24], edx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push edi
mov ecx, esi
mov ebp, eax
call fcn.00402a30
push ebx
mov dword [eax + 0x1c], ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4042a6
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebp, dword [esi + 4]
test ebp, ebp
mov dword [esp + 0x28], eax
je 0x404437
mov ecx, dword [esi + 8]
sub ecx, ebp
mov eax, 0x66666667
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, edi
jbe 0x404437
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x28]
sub eax, dword [ecx + ebp + 0x1c]
cmp eax, 0x7d0
ja 0x4041c0
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x4041c0
push ebx
mov dword [esp + 0x24], 1
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4042ae
lea edx, [esp + 0x34]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push edi
mov ecx, esi
mov dword [esp + 0x34], eax
call fcn.00402a30
mov ecx, dword [eax + 0x20]
cmp ecx, dword [esp + 0x30]
jne 0x4041ee
mov edx, dword [eax + 0x24]
cmp edx, dword [esp + 0x34]
je 0x4042cb
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x4042cb
push edi
mov ecx, esi
mov dword [esp + 0x24], 1
call fcn.00402a30
mov ecx, dword [esp + 0x30]
mov dword [eax + 0x20], ecx
mov edx, dword [esp + 0x34]
push edi
mov ecx, esi
mov dword [eax + 0x24], edx
call fcn.00402a30
mov ecx, dword [esp + 0x28]
push ebx
mov dword [eax + 0x1c], ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4042ae
mov ebp, dword [esi + 4]
test ebp, ebp
je 0x404437
mov ecx, dword [esi + 8]
sub ecx, ebp
mov eax, 0x66666667
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, edi
jbe 0x404437
mov edx, dword [esp + 0x1c]
mov eax, dword [edx + ebp]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4042a6
test al, 0x10
je 0x4042a6
push edi
mov ecx, esi
call fcn.00402a30
push edi
mov ecx, esi
mov dword [eax + 4], 1
call fcn.00402a30
xor ebx, ebx
push edi
mov ecx, esi
mov dword [eax + 0xc], ebx
call fcn.00402a30
push edi
mov ecx, esi
mov dword [eax + 8], ebx
call fcn.00402a30
mov dword [eax + 0x10], 2
mov dword [esp + 0x20], 1
mov ebx, dword [esp + 0x1c]
mov eax, dword [esp + 0x24]
inc edi
add ebx, 0x28
cmp edi, eax
mov dword [esp + 0x1c], ebx
jl 0x403fb0
jmp 0x40448d
mov ebp, dword [esi + 4]
test ebp, ebp
je 0x4042ec
mov ecx, dword [esi + 8]
sub ecx, ebp
mov eax, 0x66666667
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, edi
ja 0x4042f3
mov ecx, esi
jmp fcn.00402560
lea eax, [edi + edi*4]
shl eax, 3
mov dword [eax + ebp + 8], 1
mov ebp, dword [esi + 4]
test ebp, ebp
mov dword [esp + 0x14], eax
je 0x404326
mov ecx, dword [esi + 8]
sub ecx, ebp
mov eax, 0x66666667
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, edi
ja 0x40432d
mov ecx, esi
jmp fcn.00402560
mov ecx, dword [esp + 0x14]
mov dword [ecx + ebp + 4], 1
mov ebp, dword [esi + 4]
test ebp, ebp
je 0x40435a
mov ecx, dword [esi + 8]
sub ecx, ebp
mov eax, 0x66666667
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, edi
ja 0x404361
mov ecx, esi
jmp fcn.00402560
mov edx, dword [esp + 0x14]
mov dword [edx + ebp + 0xc], 0
mov ebp, dword [esi + 4]
test ebp, ebp
je 0x40438e
mov ecx, dword [esi + 8]
sub ecx, ebp
mov eax, 0x66666667
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, edi
ja 0x404395
mov ecx, esi
jmp fcn.00402560
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + ebp + 0x18]
test ecx, ecx
mov ebp, dword [esi + 4]
je 0x4043d7
test ebp, ebp
je 0x4043c2
mov ecx, dword [esi + 8]
sub ecx, ebp
mov eax, 0x66666667
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, edi
ja 0x4043c9
mov ecx, esi
jmp fcn.00402560
mov ecx, dword [esp + 0x14]
mov dword [ecx + ebp + 0x10], 3
jmp 0x404408
test ebp, ebp
je 0x4043f5
mov ecx, dword [esi + 8]
sub ecx, ebp
mov eax, 0x66666667
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, edi
ja 0x4043fc
mov ecx, esi
jmp fcn.00402560
mov edx, dword [esp + 0x14]
mov dword [edx + ebp + 0x10], 0
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 0xa4]
test ecx, ecx
je 0x404466
mov ebp, dword [esi + 4]
test ebp, ebp
je 0x404437
mov ecx, dword [esi + 8]
sub ecx, ebp
mov eax, 0x66666667
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, edi
ja 0x40443e
mov ecx, esi
jmp fcn.00402560
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx + ebp]
push edx
call fcn.00408930
add esp, 4
test eax, eax
je 0x404466
push edi
mov ecx, esi
call fcn.00402a30
mov eax, dword [eax]
mov ecx, dword [esp + 0x18]
push eax
call fcn.00403db0
mov eax, dword [0x41c3f8]
test eax, eax
je 0x404486
mov eax, dword [eax + 0x20]
test eax, eax
je 0x404486
push 1
push 0
push 0x8064
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x18]
cmp dword [eax + 0x5c], 1
jne 0x4044ac
cmp edi, dword [esp + 0x24]
jne 0x4044ac
mov ecx, dword [esp + 0x20]
test ecx, ecx
jne 0x4044ac
mov dword [eax + 0x5c], 0
mov ecx, dword [esp + 0x2c]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
mov eax, 1
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret