Function at 0x412f60
Capabilities:
Check for time delay via gettickcount
Check if file exists
Enumerate files on windows
Get file attributes

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x10c78
call fcn.00465040
mov eax, dword [0x4c07e0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
push 0x140
mov dword [ebp - 0x10c5c], eax
mov edi, ecx
lea eax, [ebp - 0x10a44]
push 0
push eax
call fcn.00466b60
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetTickCount]
add eax, dword [ebp + 8]
mov esi, dword [edi]
mov dword [ebp - 0x10c78], eax
test esi, esi
jne 0x412fc4
pop edi
or eax, 0xffffffff
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00464e2f
mov esp, ebp
pop ebp
ret 8
cmp dword [edi + 0x14], 0
jne 0x412fd8
mov dword [edi + 0x38], 0
mov dword [edi + 0x34], 0
push ebx
push 0x20c
lea eax, [ebp - 0x10c50]
push 0
push eax
call fcn.00466b60
add esp, 0xc
lea eax, [ebp - 0x10c50]
mov ecx, esi
push eax
call fcn.00415ab0
test eax, eax
jne 0x413a0d
mov eax, dword [ebp - 0x10c50]
cmp eax, 0xffffffff
jne 0x413074
push 0x800
lea eax, [ebp - 0x904]
push 0
push eax
call fcn.00466b60
add esp, 0xc
cmp byte [ebp - 0x10c44], 0
je 0x4139e1
lea eax, [ebp - 0x10c44]
push eax
lea eax, [ebp - 0x904]
push str._s.
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x10a44]
push eax
lea eax, [ebp - 0x904]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 0x10c50], eax
cmp eax, 0xffffffff
je 0x4139e1
jmp 0x413090
lea ecx, [ebp - 0x10a44]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
je 0x4139d5
nop word [eax + eax]
lea ecx, [ebp - 0x10a18]
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4130a0
mov eax, dword [ebp - 0x10a44]
sub ecx, edx
mov dl, byte [ebp - 0x10a18]
cmp ecx, 2
jne 0x4130cf
cmp dl, 0x2e
jne 0x4130cf
cmp byte [ebp - 0x10a17], dl
jne 0x4130cf
test al, 0x10
jne 0x4139ba
cmp ecx, 1
jne 0x413240
cmp dl, 0x2e
jne 0x413240
test al, 0x10
je 0x413248
lea eax, [ebp - 0x10c44]
push eax
call fcn.0044d9a0
add esp, 4
test al, al
je 0x4139ba
cmp dword [ebp - 0x10c4c], 0xffffffff
jne 0x413151
mov ecx, edi
call fcn.00414fe0
mov eax, dword [edi + 0xc]
mov dword [ebp - 0x10c4c], eax
lea eax, [ebp - 0x10c44]
push eax
push dword [edi + 0x803c]
call fcn.00415c60
mov edx, dword [edi + 0xc]
add esp, 8
mov ecx, dword [edi + 4]
mov dword [ecx + edx*8], eax
mov edx, dword [edi + 0xc]
mov ecx, dword [edi + 4]
mov eax, dword [ebp - 0x10c48]
mov dword [ecx + edx*8 + 4], eax
inc dword [edi + 0xc]
mov dword [edi + 0x30], 0
mov ecx, edi
call fcn.00415060
mov eax, dword [edi + 0x14]
push str.___EMPTY___
lea ecx, [eax*8]
sub ecx, eax
mov eax, dword [edi + 0x10]
mov dword [eax + ecx*4 + 4], 0
mov eax, dword [edi + 0x14]
mov ecx, dword [edi + 0x10]
lea edx, [eax*8]
sub edx, eax
mov eax, dword [ebp - 0x10c4c]
mov dword [ecx + edx*4 + 8], eax
push dword [edi + 0x803c]
call fcn.00415c60
mov ecx, dword [edi + 0x14]
lea edx, [ecx*8]
sub edx, ecx
mov ecx, dword [edi + 0x10]
mov dword [ecx + edx*4], eax
mov eax, dword [edi + 0x14]
mov ecx, dword [edi + 0x10]
lea edx, [eax*8]
sub edx, eax
mov eax, dword [ebp - 0x10a28]
mov dword [ecx + edx*4 + 0x10], eax
mov eax, dword [edi + 0x14]
mov ecx, dword [edi + 0x10]
lea edx, [eax*8]
sub edx, eax
mov eax, dword [ebp - 0x10a24]
mov dword [ecx + edx*4 + 0xc], eax
lea eax, [ebp - 0x10a30]
push eax
call fcn.00414d10
mov ecx, dword [edi + 0x14]
add esp, 0xc
lea edx, [ecx*8]
sub edx, ecx
mov ecx, dword [edi + 0x10]
mov dword [ecx + edx*4 + 0x14], eax
mov eax, dword [edi + 0x14]
lea ecx, [eax*8]
sub ecx, eax
mov eax, dword [edi + 0x10]
lea ecx, [eax + ecx*4]
mov eax, dword [ecx + 0x14]
cmp eax, dword [edi + 0x24]
jle 0x41321b
mov dword [edi + 0x24], eax
mov eax, dword [edi + 0x34]
mov dword [ecx + 0x18], eax
mov eax, dword [edi + 0x14]
inc dword [edi + 0x34]
pop ebx
lea ecx, [eax + 1]
mov dword [edi + 0x14], ecx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00464e2f
mov esp, ebp
pop ebp
ret 8
test al, 0x10
jne 0x41395b
lea esi, [ebp - 0x10c44]
mov byte [ebp - 0x10c51], 0
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x413258
lea ebx, [ebp - 0x10a18]
sub esi, ecx
lea ecx, [ebx + 1]
nop word [eax + eax]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x413270
sub ebx, ecx
mov ecx, str..WASTESTATE
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x413281
sub ecx, edx
lea eax, [ecx + 1]
add eax, ebx
add eax, esi
cmp eax, 0x1000
jae 0x41332a
lea eax, [ebp - 0x10c44]
push eax
lea eax, [esi + 1]
push eax
lea eax, [ebp - 0x10904]
push eax
call fcn.0046b5c5
lea ecx, [ebp - 0x10904]
add esp, 0xc
add esi, ecx
lea ecx, [ebp - 0x10a18]
lea edx, [ecx + 1]
mov byte [esi], 0x5c
inc esi
mov byte [esi], 0
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4132d0
sub ecx, edx
lea eax, [ebp - 0x10a18]
push eax
lea eax, [ecx + 1]
push eax
push esi
call fcn.0046b5c5
mov ecx, str..WASTESTATE
add esp, 0xc
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4132f5
sub ecx, edx
push str..WASTESTATE
lea eax, [ecx + 1]
push eax
lea eax, [esi + ebx]
push eax
call fcn.0046b5c5
add esp, 0xc
lea eax, [ebp - 0x10904]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
setne byte [ebp - 0x10c51]
lea eax, [ebp - 0x10a18]
push eax
call fcn.0044da70
add esp, 4
mov esi, eax
cmp byte [ebp - 0x10c51], 0
jne 0x4139ac
push str.WASTESTATE
push esi
call fcn.0047ca85
add esp, 8
test eax, eax
jne 0x413382
mov ecx, esi
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x413360
sub ecx, edx
mov edx, str.WASTESTATE
lea ebx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x413371
sub edx, ebx
cmp ecx, edx
je 0x4139ac
push esi
lea eax, [edi + 0x3c]
mov ecx, edi
push eax
call fcn.004150f0
test eax, eax
je 0x4139ac
cmp dword [ebp - 0x10c4c], 0xffffffff
jne 0x4133e7
mov ecx, edi
call fcn.00414fe0
mov eax, dword [edi + 0xc]
mov dword [ebp - 0x10c4c], eax
lea eax, [ebp - 0x10c44]
push eax
push dword [edi + 0x803c]
call fcn.00415c60
mov edx, dword [edi + 0xc]
add esp, 8
mov ecx, dword [edi + 4]
mov dword [ecx + edx*8], eax
mov edx, dword [edi + 0xc]
mov ecx, dword [edi + 4]
mov eax, dword [ebp - 0x10c48]
mov dword [ecx + edx*8 + 4], eax
inc dword [edi + 0xc]
mov dword [edi + 0x30], 0
mov ecx, edi
call fcn.00415060
mov eax, dword [edi + 0x14]
lea ecx, [eax*8]
sub ecx, eax
mov eax, dword [edi + 0x10]
mov dword [eax + ecx*4 + 4], 0
mov eax, dword [edi + 0x14]
mov ecx, dword [edi + 0x10]
lea edx, [eax*8]
sub edx, eax
mov eax, dword [ebp - 0x10c4c]
mov dword [ecx + edx*4 + 8], eax
lea eax, [ebp - 0x10a18]
push eax
push dword [edi + 0x803c]
call fcn.00415c60
mov ecx, dword [edi + 0x14]
lea edx, [ecx*8]
sub edx, ecx
mov ecx, dword [edi + 0x10]
mov dword [ecx + edx*4], eax
mov eax, dword [edi + 0x14]
mov ecx, dword [edi + 0x10]
lea edx, [eax*8]
sub edx, eax
mov eax, dword [ebp - 0x10a28]
mov dword [ecx + edx*4 + 0x10], eax
mov eax, dword [edi + 0x14]
mov ecx, dword [edi + 0x10]
lea edx, [eax*8]
sub edx, eax
mov eax, dword [ebp - 0x10a24]
mov dword [ecx + edx*4 + 0xc], eax
lea eax, [ebp - 0x10a30]
push eax
call fcn.00414d10
mov ecx, dword [edi + 0x14]
add esp, 0xc
lea edx, [ecx*8]
sub edx, ecx
mov ecx, dword [edi + 0x10]
mov dword [ecx + edx*4 + 0x14], eax
mov eax, dword [edi + 0x14]
lea ecx, [eax*8]
sub ecx, eax
mov eax, dword [edi + 0x10]
shl ecx, 2
mov dword [ebp - 0x10c68], ecx
lea edx, [eax + ecx]
mov eax, dword [eax + ecx + 0x14]
mov dword [ebp - 0x10c74], edx
cmp eax, dword [edi + 0x24]
jle 0x4134c3
mov dword [edi + 0x24], eax
mov eax, dword [ebp - 0x10c5c]
mov dword [ebp - 0x10c70], 1
mov dword [ebp - 0x10c6c], 1
test eax, eax
je 0x413723
cmp dword [edi + 0x30], 0
jne 0x4135b7
mov esi, dword [edi + 0x2c]
xor ebx, ebx
mov dword [edi + 0x30], 1
mov ecx, dword [eax + 0x14]
mov dword [ebp - 0x10c58], htonl
mov dword [ebp - 0x10c60], ecx
test ecx, ecx
jle 0x4135b7
mov edx, dword [eax + 0x10]
mov dword [ebp - 0x10c64], edx
nop
lea eax, [esi*8]
sub eax, esi
mov edx, dword [edx + eax*4 + 8]
cmp edx, dword [ebp - 0x10c58]
je 0x41358f
mov eax, dword [ebp - 0x10c68]
mov ecx, dword [edi + 0x10]
mov dword [ebp - 0x10c58], edx
mov ecx, dword [ecx + eax + 8]
mov eax, dword [edi + 4]
mov eax, dword [eax + ecx*8]
mov ecx, dword [ebp - 0x10c5c]
mov ecx, dword [ecx + 4]
mov ecx, dword [ecx + edx*8]
nop word [eax + eax]
mov dl, byte [ecx]
cmp dl, byte [eax]
jne 0x413580
test dl, dl
je 0x41357c
mov dl, byte [ecx + 1]
cmp dl, byte [eax + 1]
jne 0x413580
add ecx, 2
add eax, 2
test dl, dl
jne 0x413560
xor eax, eax
jmp 0x413585
sbb eax, eax
or eax, 1
test eax, eax
je 0x4135a7
mov ecx, dword [ebp - 0x10c60]
inc esi
xor eax, eax
cmp esi, ecx
cmove esi, eax
inc ebx
cmp ebx, ecx
jge 0x4135b1
mov edx, dword [ebp - 0x10c64]
jmp 0x413520
mov dword [edi + 0x30], 2
mov dword [edi + 0x2c], esi
mov eax, dword [ebp - 0x10c5c]
cmp dword [edi + 0x30], 2
jne 0x413723
mov ecx, dword [edi + 0x2c]
xor ebx, ebx
mov edx, dword [eax + 0x10]
mov dword [ebp - 0x10c58], edx
lea esi, [ecx*8]
sub esi, ecx
shl esi, 2
mov eax, dword [edx + esi + 8]
mov dword [ebp - 0x10c64], eax
mov eax, dword [ebp - 0x10c5c]
mov eax, dword [eax + 0x14]
test eax, eax
jle 0x413723
add ecx, ebx
mov dword [ebp - 0x10c60], ecx
cmp ecx, eax
jg 0x413723
mov eax, dword [ebp - 0x10c64]
cmp eax, dword [esi + edx + 8]
jne 0x413723
mov ecx, dword [esi + edx]
mov eax, dword [ebp - 0x10c68]
mov edx, dword [edi + 0x10]
mov eax, dword [edx + eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x413645
test dl, dl
je 0x413641
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x413645
add eax, 2
add ecx, 2
test dl, dl
jne 0x413625
xor eax, eax
jmp 0x41364a
sbb eax, eax
or eax, 1
test eax, eax
je 0x41366d
mov ecx, dword [ebp - 0x10c5c]
inc ebx
mov edx, dword [ebp - 0x10c58]
add esi, 0x1c
mov eax, dword [ecx + 0x14]
mov ecx, dword [edi + 0x2c]
cmp ebx, eax
jl 0x4135f6
jmp 0x413723
mov ecx, dword [ebp - 0x10c74]
mov ebx, dword [ebp - 0x10c58]
mov eax, dword [ecx + 0xc]
cmp eax, dword [esi + ebx + 0xc]
jne 0x41370c
mov eax, dword [ecx + 0x10]
cmp eax, dword [esi + ebx + 0x10]
jne 0x41370c
mov eax, dword [ecx + 0x14]
cmp eax, dword [esi + ebx + 0x14]
jne 0x41370c
cmp dword [edi + 0x38], 0
je 0x4136b3
mov eax, dword [esi + ebx + 0x18]
mov dword [ecx + 0x18], eax
mov dword [ebp - 0x10c70], 0
mov eax, dword [edi + 0x14]
push dword [esi + ebx + 4]
lea ecx, [eax*8]
sub ecx, eax
mov eax, dword [edi + 0x10]
push dword [eax + ecx*4]
push str.got_cached_metadata_for__s_s
push 6
call fcn.00401ad0
mov eax, dword [esi + ebx + 4]
add esp, 0x10
test eax, eax
je 0x413702
push eax
push dword [edi + 0x803c]
call fcn.00415c60
mov ecx, dword [edi + 0x14]
add esp, 8
lea edx, [ecx*8]
sub edx, ecx
mov ecx, dword [edi + 0x10]
mov dword [ecx + edx*4 + 4], eax
mov dword [ebp - 0x10c6c], 0
mov eax, dword [ebp - 0x10c60]
inc eax
cmp dword [ebp - 0x10c6c], 0
mov dword [edi + 0x28], eax
je 0x4138fc
lea eax, [ebp - 0x10a18]
push eax
call fcn.0044da70
mov esi, eax
push 0x49210c
push esi
call fcn.0047ca85
add esp, 0xc
test eax, eax
je 0x413771
push 0x492110
push esi
call fcn.0047ca85
add esp, 8
test eax, eax
je 0x413771
push 0x492114
push esi
call fcn.0047ca85
add esp, 8
mov dword [ebp - 0x10c58], 0
test eax, eax
jne 0x41377b
mov dword [ebp - 0x10c58], 1
push 0x492118
push esi
call fcn.0047ca85
add esp, 8
test eax, eax
je 0x4137b5
push str.jpeg
push esi
call fcn.0047ca85
add esp, 8
test eax, eax
je 0x4137b5
push str.jfif
push esi
call fcn.0047ca85
add esp, 8
test eax, eax
je 0x4137b5
xor ebx, ebx
jmp 0x4137ba
mov ebx, 1
cmp dword [ebp - 0x10c58], 0
jne 0x4137cb
test ebx, ebx
je 0x4138fc
push 0x3ff
lea eax, [ebp - 0x503]
push 0
push eax
call fcn.00466b60
lea eax, [ebp - 0x10a18]
mov byte [ebp - 0x504], 0
push eax
lea eax, [ebp - 0x10c44]
push eax
lea eax, [ebp - 0x504]
push 0x4920ac
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x1c
lea eax, [ebp - 0x504]
push 0
push 0
push 3
push 0
push 1
push accept
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x4138d7
push 0x100
lea eax, [ebp - 0x104]
push 0
push eax
call fcn.00466b60
add esp, 0xc
cmp dword [ebp - 0x10c58], 0
je 0x413872
mov eax, dword [edi + 0x14]
lea ecx, [eax*8]
sub ecx, eax
mov eax, dword [edi + 0x10]
push dword [eax + ecx*4 + 0xc]
lea eax, [ebp - 0x104]
mov ecx, edi
push eax
push esi
call fcn.004151b0
jmp 0x413898
test ebx, ebx
je 0x413898
mov eax, dword [edi + 0x14]
lea ecx, [eax*8]
sub ecx, eax
mov eax, dword [edi + 0x10]
push dword [eax + ecx*4 + 0xc]
lea eax, [ebp - 0x104]
mov ecx, edi
push eax
push esi
call fcn.004156b0
cmp byte [ebp - 0x104], 0
mov byte [ebp - 0xc5], 0
je 0x4138d0
lea eax, [ebp - 0x104]
push eax
push dword [edi + 0x803c]
call fcn.00415c60
mov ecx, dword [edi + 0x14]
add esp, 8
lea edx, [ecx*8]
sub edx, ecx
mov ecx, dword [edi + 0x10]
mov dword [ecx + edx*4 + 4], eax
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [edi + 0x14]
lea ecx, [eax*8]
sub ecx, eax
mov eax, dword [edi + 0x10]
push dword [eax + ecx*4 + 4]
push dword [eax + ecx*4]
push str.read_metadata_for__s_s
push 6
call fcn.00401ad0
add esp, 0x10
mov edx, dword [edi + 0x10]
test edx, edx
je 0x413922
cmp dword [ebp - 0x10c70], 0
je 0x413922
mov eax, dword [edi + 0x14]
lea ecx, [eax*8]
sub ecx, eax
mov eax, dword [edi + 0x34]
mov dword [edx + ecx*4 + 0x18], eax
inc dword [edi + 0x34]
mov esi, dword [edi + 0x14]
mov eax, dword [edi + 0x10]
lea ecx, [esi*8]
sub ecx, esi
lea edx, [eax + ecx*4]
mov eax, dword [edx + 0xc]
add eax, dword [edi + 0x20]
and eax, 0xfffff
mov dword [edi + 0x20], eax
mov ecx, dword [edx + 0x10]
mov eax, dword [edx + 0xc]
shr eax, 0x14
shl ecx, 0xc
add ecx, eax
lea eax, [esi + 1]
add dword [edi + 0x1c], ecx
mov dword [edi + 0x14], eax
jmp 0x4139ac
lea eax, [ebp - 0x10a18]
push eax
lea eax, [ebp - 0x10c44]
push eax
lea eax, [ebp - 0x304]
push 0x4920ac
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov eax, dword [ebp - 0x10c48]
add esp, 0x10
mov ecx, dword [edi]
mov dword [ebp - 0x308], eax
lea eax, [ebp - 0x310]
mov dword [ebp - 0x310], 0xffffffff
push eax
mov dword [ebp - 0x30c], 0xffffffff
call fcn.00415af0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x10c78]
jns 0x413a36
lea eax, [ebp - 0x10a44]
push eax
push dword [ebp - 0x10c50]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x413090
push dword [ebp - 0x10c50]
call dword [sym.imp.KERNEL32.dll_FindClose]
push 0x20c
lea eax, [ebp - 0x10c50]
push 0
push eax
call fcn.00466b60
mov ecx, dword [edi]
lea eax, [ebp - 0x10c50]
add esp, 0xc
push eax
call fcn.00415ab0
test eax, eax
je 0x413005
mov ecx, dword [edi]
test ecx, ecx
je 0x413a1a
push 1
call fcn.00415900
mov dword [edi], 0
mov eax, dword [edi + 0x14]
mov ecx, dword [ebp - 4]
pop ebx
pop edi
xor ecx, ebp
pop esi
call fcn.00464e2f
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [edi]
lea eax, [ebp - 0x10c50]
push eax
call fcn.00415af0
jmp 0x413a20