Function at 0x1003e770
Capabilities:
Check if file exists
Enumerate files on windows
Get file attributes

Disassembly:
push ebp
lea ebp, [esp - 0x398]
sub esp, 0x398
push 0xffffffffffffffff
push 0x1008a919
mov eax, dword fs:[0]
push eax
sub esp, 0x8c
mov eax, dword [0x100a8810]
xor eax, ebp
mov dword [ebp + 0x394], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov ebx, ecx
mov dword [ebp - 0x18], ebx
mov edi, dword [ebp + 0x3a0]
mov dword [ebp - 0x24], edi
mov esi, dword [ebp + 0x3a4]
mov dword [ebp - 0x20], esi
mov byte [ebp + 0x140], 0
push 0x103
push 0
lea eax, [ebp + 0x141]
push eax
call fcn.10054210
xor eax, eax
mov dword [ebp + 0x244], eax
mov dword [ebp + 0x248], eax
mov dword [ebp + 0x24c], eax
mov dword [ebp + 0x250], eax
mov dword [ebp + 0x254], eax
mov byte [ebp + 0x290], al
push 0x103
push eax
lea ecx, [ebp + 0x291]
push ecx
call fcn.10054210
add esp, 0x18
test esi, esi
je 0x100319a8
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10031668
sub eax, edx
je 0x100319a8
push str.NULL
push esi
call fcn.10054f32
add esp, 8
test eax, eax
je 0x100319a8
call fcn.1000b4f0
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x10031b22
mov dword [ebp - 4], 0
mov edx, dword [eax + 0xc]
mov esi, dword [edx + 0xc]
mov dword [ebp - 0x14], esi
mov ebx, 2
mov eax, dword [eax + 0xc]
add eax, 0xc
cmp esi, eax
je 0x1003198c
push 0x118
push 0
lea ecx, [ebp + 0x140]
push ecx
call fcn.10054210
add esp, 0xc
mov esi, dword [esi + 0x28]
test esi, esi
jne 0x100316e1
xor eax, eax
jmp 0x10031714
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x100316f4
xor eax, eax
jmp 0x10031714
lea edi, [eax + eax]
mov eax, edi
call fcn.10055800
mov dword [ebp - 0x10], esp
mov eax, esp
mov ecx, 3
push ecx
push edi
push esi
push eax
call fcn.1002c6e0
mov edi, dword [ebp - 0x24]
push eax
push 0x104
lea edx, [ebp + 0x140]
push edx
call fcn.10004860
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 0x18]
mov dword [ebp + 0x244], ecx
mov edx, dword [eax + 0x20]
mov dword [ebp + 0x248], edx
lea eax, [ebp + 0x140]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x100318ee
mov ecx, dword [ebp - 0x20]
push ecx
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call esi
lea edx, [ebp + 0x140]
push edx
mov dword [ebp - 0x28], eax
call esi
mov ecx, dword [ebp - 0x28]
cmp eax, ecx
jne 0x100318ee
lea eax, [ebp + 0x140]
push eax
lea ecx, [ebp + 0x274]
call fcn.10005ef0
mov byte [ebp - 4], 1
push edi
lea ecx, [ebp + 0x258]
call fcn.10005ef0
mov byte [ebp - 4], bl
push 0xffffffffffffffff
push 0x1008e560
lea ecx, [ebp + 0x274]
call fcn.1002ff30
inc eax
push eax
xor esi, esi
push esi
lea ecx, [ebp - 0x44]
push ecx
lea ecx, [ebp + 0x274]
call fcn.10030940
mov byte [ebp - 4], 3
push 0xffffffffffffffff
push esi
push eax
lea ecx, [ebp + 0x274]
call fcn.100059f0
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x44]
call fcn.100056b0
push esi
push 0x1008f738
lea ecx, [ebp + 0x258]
call fcn.1002ff00
cmp eax, 0xffffffff
je 0x1003180e
push 0xffffffffffffffff
push 0x1008e560
lea ecx, [ebp + 0x274]
call fcn.1002ff30
cmp eax, 0xffffffff
jne 0x10031900
push esi
push 0x1008f734
lea ecx, [ebp + 0x258]
call fcn.1002ff00
cmp eax, 0xffffffff
je 0x10031867
push 0xffffffffffffffff
push esi
push 0x1008f734
lea ecx, [ebp + 0x258]
call fcn.1002ff00
add eax, ebx
push eax
lea edx, [ebp - 0x7c]
push edx
lea ecx, [ebp + 0x258]
call fcn.10030940
mov byte [ebp - 4], 6
push 0xffffffffffffffff
push esi
push eax
lea ecx, [ebp + 0x258]
call fcn.100059f0
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x7c]
call fcn.100056b0
push 0xffffffffffffffff
push esi
lea eax, [ebp + 0x258]
push eax
lea ecx, [ebp + 0x274]
call fcn.10030550
cmp dword [ebp + 0x28c], 0x10
mov eax, dword [ebp + 0x278]
jae 0x10031891
lea eax, [ebp + 0x278]
push eax
push 0x104
lea ecx, [ebp + 0x140]
push ecx
call fcn.10004860
lea edx, [ebp + 0x140]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x100318d0
mov dword [ebp + 0x244], esi
mov dword [ebp + 0x248], esi
lea eax, [ebp + 0x140]
push eax
mov ecx, dword [ebp - 0x18]
call fcn.100310d0
mov byte [ebp - 4], 1
lea ecx, [ebp + 0x258]
call fcn.100056b0
mov byte [ebp - 4], 0
lea ecx, [ebp + 0x274]
call fcn.100056b0
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
mov dword [ebp - 0x14], ecx
mov eax, dword [ebp - 0x1c]
mov esi, ecx
jmp 0x100316b2
push 0xffffffffffffffff
push 0x1008e560
lea ecx, [ebp + 0x274]
call fcn.1002ff30
inc eax
push eax
push esi
lea ecx, [ebp - 0x60]
push ecx
lea ecx, [ebp + 0x274]
call fcn.10030940
mov byte [ebp - 4], 4
push 0xffffffffffffffff
push esi
push eax
lea ecx, [ebp + 0x274]
call fcn.100059f0
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x60]
call fcn.100056b0
push 0xffffffffffffffff
push esi
push 0x1008f738
lea ecx, [ebp + 0x258]
call fcn.1002ff00
add eax, 3
push eax
lea edx, [ebp - 0x98]
push edx
lea ecx, [ebp + 0x258]
call fcn.10030940
mov byte [ebp - 4], 5
push 0xffffffffffffffff
push esi
push eax
lea ecx, [ebp + 0x258]
call fcn.100059f0
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x98]
jmp 0x100317d8
mov dword [ebp - 4], 0xffffffff
mov ebx, dword [ebp - 0x18]
jmp 0x10031b22
test edi, edi
jne 0x100319b3
xor eax, eax
jmp 0x10031b3b
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100319b8
sub eax, edx
je 0x100319ac
push 0
push 0x80
push 3
push 0
push 0
push closesocket
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
je 0x10031a2d
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x118
push 0
lea edx, [ebp + 0x140]
push edx
call fcn.10054210
push edi
push 0x1008f720
push 0x103
lea eax, [ebp + 0x140]
push eax
call fcn.100049b0
add esp, 0x1c
lea ecx, [ebp + 0x140]
push ecx
mov ecx, ebx
call fcn.100310d0
mov eax, 1
jmp 0x10031b3b
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10031a32
sub eax, edx
push edi
cmp byte [edi + eax - 1], 0x5c
jne 0x10031a56
push str._s.
push 0x104
lea edx, [ebp + 0x290]
push edx
jmp 0x10031a67
push 0x1008f724
push 0x104
lea eax, [ebp + 0x290]
push eax
call fcn.100049b0
add esp, 0x10
lea ecx, [ebp]
push ecx
lea edx, [ebp + 0x290]
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x10031b22
jmp 0x10031a90
test dword [ebp], 0x10
jne 0x10031b08
push 0x118
push 0
lea eax, [ebp + 0x140]
push eax
call fcn.10054210
add esp, 0xc
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10031ab4
sub eax, edx
cmp byte [eax + edi - 1], 0x5c
jne 0x10031adc
lea ecx, [ebp + 0x2c]
push ecx
push edi
push 0x1008f6f4
push 0x104
lea edx, [ebp + 0x140]
push edx
jmp 0x10031af2
lea eax, [ebp + 0x2c]
push eax
push edi
push 0x1008ebd4
push 0x104
lea ecx, [ebp + 0x140]
push ecx
call fcn.100049b0
add esp, 0x14
lea edx, [ebp + 0x140]
push edx
mov ecx, ebx
call fcn.100310d0
lea eax, [ebp]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x10031a90
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [ebx + 0x14]
mov eax, 0xea0ea0eb
sub ecx, dword [ebx + 0x10]
imul ecx
add edx, ecx
sar edx, 8
mov eax, edx
shr eax, 0x1f
add eax, edx
lea esp, [ebp - 0xa8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x394]
xor ecx, ebp
call fcn.10053b60
add ebp, 0x398
mov esp, ebp
pop ebp
ret 8
add ecx, 4
jmp 0x100315b0