Function at 0x402850
Capabilities:
Get file attributes

Disassembly:
mov eax, 0x100c
call fcn.0041ec80
mov eax, dword [0x42827c]
xor eax, esp
mov dword [esp + 0x1008], eax
push ebx
push esi
xor ebx, ebx
push 0x800
lea eax, [esp + 0x14]
mov esi, ecx
push ebx
push eax
mov dword [esp + 0x18], esi
mov dword [esp + 0x14], ebx
call fcn.004130d0
mov eax, esi
add esp, 0xc
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x402890
sub eax, edx
sar eax, 1
cmp eax, 3
jbe 0x402b6a
xor eax, eax
lea ebx, [ebx]
movzx ecx, word [eax + 0x424d18]
mov word [esp + eax + 0x10], cx
add eax, 2
cmp cx, bx
jne 0x4028b0
mov eax, esi
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4028c6
push edi
lea edi, [esp + 0x14]
sub eax, esi
add edi, 0xfffffffe
jmp 0x4028e0
mov cx, word [edi + 2]
add edi, 2
cmp cx, bx
jne 0x4028e0
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]
cmp word [esp + 0x22], bx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, 7
je 0x4029f2
lea eax, [esp + 0x26]
lea esi, [edi + 7]
jmp 0x402920
cmp word [eax], 0x5c
jne 0x4029d3
push edi
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x820]
push edx
call fcn.0040d045
lea eax, [esp + 0x824]
push eax
mov word [esp + esi + 0x828], bx
call fcn.0040e263
add esp, 0x10
cmp eax, 0xffffffff
jne 0x4029c4
call fcn.0040e2ca
cmp dword [eax], 0x11
jne 0x402a9a
lea ecx, [esp + 0x818]
push ecx
call ebp
test al, 0x10
jne 0x4029d3
push 0x104
push str....._src_sftlcmn_sftl_filesys.c
push 0x430070
mov dword [0x42fde0], 0xc
mov word [0x42fe68], bx
mov dword [0x42fde4], ebx
mov word [0x43006e], bx
call fcn.0040d045
add esp, 0xc
mov word [0x430276], bx
mov dword [0x430278], 0x47
or eax, 0xffffffff
jmp 0x402b85
cmp word [esp + esi + 0x1a], bx
jne 0x4029d3
mov dword [esp + 0x10], 1
add edi, 1
lea esi, [edi + edi]
cmp word [esp + esi + 0x18], bx
lea eax, [esp + esi + 0x18]
jne 0x402920
cmp dword [esp + 0x10], ebx
jne 0x402b83
lea ecx, [esp + 0x18]
push ecx
call fcn.0040e263
add esp, 4
cmp eax, 0xffffffff
jne 0x402b83
call fcn.0040e2ca
cmp dword [eax], 0x11
je 0x402b14
push 0x40
push str.mkdir
push 0x42fde8
mov dword [0x42fde0], 0xca
call fcn.0040d045
add esp, 0xc
mov word [0x42fe68], bx
call fcn.0040e2ca
mov edx, dword [eax]
mov eax, dword [esp + 0x14]
cmp eax, ebx
mov dword [0x42fde4], edx
je 0x402a63
push 0x104
push eax
push 0x42fe68
call fcn.0040d045
add esp, 0xc
push 0x104
push str....._src_sftlcmn_sftl_filesys.c
push 0x430070
mov word [0x43006e], bx
call fcn.0040d045
add esp, 0xc
mov word [0x430276], bx
mov dword [0x430278], 0x6c
or eax, 0xffffffff
jmp 0x402b85
push 0x40
push str.mkdir
push 0x42fde8
mov dword [0x42fde0], 0xca
call fcn.0040d045
mov word [0x42fe68], bx
call fcn.0040e2ca
mov edx, dword [eax]
push 0x104
lea eax, [esp + 0x828]
push eax
push 0x42fe68
mov dword [0x42fde4], edx
call fcn.0040d045
push 0x104
push str....._src_sftlcmn_sftl_filesys.c
push 0x430070
mov word [0x43006e], bx
call fcn.0040d045
add esp, 0x24
mov word [0x430276], bx
mov dword [0x430278], 0x4f
or eax, 0xffffffff
jmp 0x402b85
lea eax, [esp + 0x18]
push eax
call ebp
test al, 0x10
jne 0x402b83
push 0x104
push str....._src_sftlcmn_sftl_filesys.c
push 0x430070
mov dword [0x42fde0], 0xc
mov word [0x42fe68], bx
mov dword [0x42fde4], ebx
mov word [0x43006e], bx
call fcn.0040d045
add esp, 0xc
mov word [0x430276], bx
mov dword [0x430278], 0x64
or eax, 0xffffffff
jmp 0x402b85
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x1008]
xor ecx, esp
call fcn.0040d036
add esp, 0x100c
ret
xor eax, eax
mov ecx, dword [esp + 0x1018]
pop ebp
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040d036
add esp, 0x100c
ret