Function at 0x473a00
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x10
mov edi, dword [esp + 0x28]
push 0x40
call sym._malloc
add esp, 4
mov ebp, eax
mov byte [eax], 0
mov esi, 0x40
test edi, edi
je 0x473a68
mov eax, dword [edi + 4]
test eax, eax
je 0x473a68
mov edi, dword [edi + 8]
test edi, edi
je 0x473a68
cmp eax, 0x40
mov ebx, eax
jb 0x473a56
inc eax
mov ecx, 0x40
nop
mov esi, ecx
add ecx, ecx
cmp eax, esi
ja 0x473a40
push esi
push ebp
call sym._realloc
add esp, 8
mov ebp, eax
mov eax, ebx
push eax
push edi
push ebp
call sym._memcpy
add esp, 0xc
mov byte [ebp + ebx], 0
jmp 0x473a6a
xor ebx, ebx
mov edi, ebp
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x473b24
push eax
call sym._strlen
add esp, 4
test eax, eax
je 0x473b24
test esi, esi
mov ecx, ebx
mov dword [esp + 4], eax
je 0x473a9d
mov edx, ecx
not edx
add edx, esi
cmp edx, eax
jae 0x473adc
cmp esi, 2
mov edx, 0x20
cmovae edx, esi
lea ebp, [ecx + 1]
mov dword [esp], ebp
add ecx, eax
inc ecx
nop word cs:[eax + eax]
mov ebp, edx
add edx, edx
cmp ecx, ebp
ja 0x473ac0
test esi, esi
je 0x473ae0
push ebp
push edi
call sym._realloc
add esp, 8
mov edi, eax
mov ecx, ebx
jmp 0x473b07
mov ebp, esi
jmp 0x473b07
mov esi, edi
push ebp
call sym._malloc
add esp, 4
mov edi, eax
test ebx, ebx
je 0x473b02
push dword [esp]
push esi
push edi
call sym._memcpy
mov ecx, ebx
add esp, 0xc
jmp 0x473b07
mov ecx, ebx
mov byte [edi], 0
lea eax, [edi + ecx]
mov esi, dword [esp + 4]
push esi
push dword [esp + 0x30]
push eax
call sym._memcpy
add esp, 0xc
add ebx, esi
mov byte [edi + ebx], 0
mov esi, ebp
test ebx, ebx
je 0x473b35
cmp byte [ebx + edi - 1], 0x2f
jne 0x473b35
mov dword [esp + 4], ebx
jmp 0x473bb0
lea eax, [ebx + 1]
test esi, esi
mov dword [esp + 4], eax
je 0x473b48
cmp esi, eax
je 0x473b48
mov ebp, esi
jmp 0x473ba8
cmp esi, 2
mov eax, 0x20
cmovae eax, esi
mov dword [esp], ebx
lea ecx, [ebx + 2]
nop dword [eax]
mov ebp, eax
add eax, eax
cmp ecx, ebp
ja 0x473b60
test esi, esi
je 0x473b7d
push ebp
push edi
call sym._realloc
add esp, 8
mov edi, eax
mov ebx, dword [esp]
jmp 0x473ba8
mov esi, edi
push ebp
call sym._malloc
add esp, 4
mov edi, eax
mov ebx, dword [esp]
test ebx, ebx
je 0x473ba5
push dword [esp + 4]
push esi
push edi
call sym._memcpy
mov ebx, dword [esp + 0xc]
add esp, 0xc
jmp 0x473ba8
mov byte [edi], 0
mov word [edi + ebx], 0x2f
mov esi, ebp
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x473c89
and eax, 0x10
je 0x473c89
mov eax, dword [esp + 0x24]
mov ecx, dword [eax + 8]
test ecx, ecx
je 0x473c2f
mov dword [esp], edi
mov edx, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp + 0xc], eax
mov dword [esp + 8], edx
lea edi, [edx + 8]
xor ebp, ebp
nop dword [eax]
mov ebx, ecx
mov eax, dword [edi - 4]
mov ecx, dword [esp + 4]
cmp eax, ecx
cmovae eax, ecx
inc eax
push eax
push dword [esp + 4]
push dword [edi]
call sym._memcmp
add esp, 0xc
test eax, eax
je 0x473c80
inc ebp
add edi, dword [esp + 0xc]
mov ecx, ebx
cmp ebx, ebp
jne 0x473bf0
mov edi, dword [esp]
mov ebx, dword [esp + 0x24]
mov edx, dword [esp + 8]
cmp ecx, dword [ebx + 0xc]
je 0x473c40
jmp 0x473c65
xor ebp, ebp
cmp ebp, ecx
jne 0x473c89
mov ebx, dword [esp + 0x24]
mov edx, dword [ebx]
cmp ecx, dword [ebx + 0xc]
jne 0x473c65
lea eax, [ecx + ecx]
test ecx, ecx
mov ecx, 0x10
cmovne ecx, eax
mov dword [ebx + 0xc], ecx
imul ecx, dword [ebx + 4]
push ecx
push edx
call sym._realloc
add esp, 8
mov edx, eax
mov dword [ebx], eax
mov ecx, dword [ebx + 8]
lea eax, [ecx + 1]
mov dword [ebx + 8], eax
imul ecx, dword [ebx + 4]
mov dword [edx + ecx], esi
mov dword [edx + ecx + 8], edi
mov eax, dword [esp + 4]
mov dword [edx + ecx + 4], eax
jmp 0x473c98
mov edi, dword [esp]
mov ecx, ebx
cmp ebp, ecx
je 0x473c35
test esi, esi
je 0x473c98
push edi
call sym._free
add esp, 0x14
jmp 0x473c9b
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
ret