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

Disassembly:
sub esp, 0x334
push ebx
mov ebx, dword [0x444cc4]
push ebp
push esi
xor ebp, ebp
cmp dword [0x437560], ebp
push edi
mov edi, dword [esp + 0x348]
mov esi, str.PB_Compiler_Home
jle 0x4186f9
lea ebx, [ebx]
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x418655
sub eax, edx
cmp eax, ebx
jne 0x418682
mov eax, dword [0x444cc0]
push ebx
push eax
push esi
call sub.MSVCRT.dll__strnicmp
add esp, 0xc
test eax, eax
je 0x418826
mov ebx, dword [0x444cc4]
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x418687
sub eax, edx
mov cl, byte [esi + eax + 1]
lea esi, [esi + eax + 1]
add esi, 1
cmp cl, 6
jne 0x4186e7
cmp dword [0x437014], 0
mov eax, esi
je 0x4186cd
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4186b0
sub eax, edx
mov edx, dword [0x4508a8]
sar eax, 1
add eax, eax
add edx, eax
add esi, edx
jmp 0x4186ea
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4186d0
sub eax, edx
mov edx, dword [0x4508a8]
add edx, eax
add esi, edx
jmp 0x4186ea
add esi, 8
add ebp, 1
cmp ebp, dword [0x437560]
jl 0x418650
cmp dword [0x4508f8], 0
jne 0x418986
xor eax, eax
jmp 0x418710
mov cl, byte [eax + 0x4371c9]
mov byte [esp + eax + 0x150], cl
add eax, 1
test cl, cl
jne 0x418710
lea eax, [esp + 0x150]
add eax, 0xffffffff
mov edi, edi
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x418730
mov edx, dword [str.Residents.res]
mov ecx, dword [0x433b7c]
mov dword [eax], edx
mov edx, dword [0x433b80]
mov dword [eax + 4], ecx
mov ecx, dword [0x433b84]
mov dword [eax + 8], edx
mov dword [eax + 0xc], ecx
lea eax, [esp + 0x150]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x418767
sub eax, edx
lea edx, [esp + 0x10]
lea ebp, [esp + eax + 0x14b]
push edx
lea eax, [esp + 0x154]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x418980
jmp 0x4187a0
test byte [esp + 0x10], 0x10
jne 0x418965
cmp dword [0x437014], 0
je 0x41893e
mov ecx, dword [str.Unicode_]
mov dword [ebp], ecx
mov edx, dword [0x433b70]
mov dword [ebp + 4], edx
mov al, byte [0x433b74]
mov byte [ebp + 8], al
lea eax, [esp + 0x3c]
mov ecx, eax
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x4187d8
mov edi, ebp
sub eax, ecx
mov esi, ecx
add edi, 0xffffffff
lea ebx, [ebx]
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x4187f0
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x150]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x418922
push 1
jmp 0x418956
mov eax, esi
lea edx, [eax + 1]
jmp 0x418830
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x418830
sub eax, edx
lea esi, [esi + eax + 1]
movsx eax, byte [esi]
add esi, 1
sub eax, 3
je 0x4188ff
sub eax, 2
je 0x4188e2
sub eax, 1
jne 0x418a71
mov dword [edi], 0x19
cmp dword [0x437014], 0
mov eax, esi
je 0x418887
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x418874
sub eax, edx
sar eax, 1
add eax, eax
jmp 0x41889b
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x418890
sub eax, edx
mov ecx, dword [0x4508a8]
mov edx, dword [0x438ec8]
add ecx, eax
push ecx
push 0
push edx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
mov dword [edi + 8], eax
je 0x4188d3
mov ecx, esi
call fcn.00413560
mov dword [edi + 0x10], 0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x334
ret
mov dword [0x444780], str.Out_of_Memory.
jmp 0x418a67
mov dword [edi], 0x18
fld qword [esi]
fstp qword [edi + 8]
mov dword [edi + 0x10], 0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x334
ret
mov dword [edi], 0x17
mov eax, dword [esi]
mov dword [edi + 8], eax
mov ecx, dword [esi + 4]
mov dword [edi + 0xc], ecx
mov dword [edi + 0x10], 0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x334
ret
lea eax, [esp + 0x3c]
mov edx, ebp
mov ecx, eax
sub edx, ecx
lea esp, [esp]
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
test cl, cl
jne 0x418930
jmp 0x418954
lea eax, [esp + 0x3c]
mov edx, ebp
mov ecx, eax
sub edx, ecx
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
test cl, cl
jne 0x418948
push 0
lea eax, [esp + 0x154]
call fcn.004184b0
add esp, 4
lea edx, [esp + 0x10]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x4187a0
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ebx, dword [0x444cc4]
mov edi, dword [0x4508f8]
test edi, edi
je 0x418a06
mov esi, dword [edi + 4]
mov eax, dword [edi + 8]
add eax, esi
cmp esi, eax
jae 0x418a00
lea esp, [esp]
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4189a5
sub eax, edx
cmp eax, ebx
jne 0x4189cd
mov ecx, dword [0x444cc0]
push ebx
push ecx
push esi
call sub.MSVCRT.dll__strnicmp
add esp, 0xc
test eax, eax
je 0x418a7c
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4189d2
mov ecx, dword [edi + 0x14]
sub eax, edx
mov edx, dword [edi + 0xc]
push edx
lea eax, [eax + esi + 1]
push eax
call ecx
mov edx, dword [edi + 8]
add edx, dword [edi + 4]
mov ebx, dword [0x444cc4]
mov esi, eax
add esp, 8
cmp esi, edx
jb 0x4189a0
mov edi, dword [edi]
test edi, edi
jne 0x418990
cmp dword [0x4390c4], 0
jne 0x418a71
mov edx, dword [0x444cc0]
mov ecx, 5
mov esi, str.Constant_not_found:_
mov edi, 0x438f28
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
push ebx
push edx
push 0x438f28
movsb byte es:[edi], byte [esi]
call sub.MSVCRT.dll_strncat
mov eax, 0x438f28
add esp, 0xc
add eax, 0xffffffff
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x418a40
mov cx, word [0x433b2c]
mov dl, byte [0x433b2e]
mov word [eax], cx
mov byte [eax + 2], dl
mov dword [0x444780], 0x438f28
mov dword [0x4390c4], 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x334
ret
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x418a81
mov ecx, dword [edi + 0xc]
sub eax, edx
mov edx, dword [esp + 0x348]
push ecx
mov ecx, dword [edi + 0x10]
push edx
lea eax, [eax + esi + 1]
push eax
call ecx
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x334
ret