Function at 0x412830
Capabilities:
Check if file exists
Create directory
Get file attributes
Resolve function by parsing pe exports

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x598ca1
push eax
mov dword fs:[0], esp
sub esp, 0x168
mov edx, dword [esp + 0x178]
lea eax, [esp + 0x68]
push ebx
push ebp
push esi
push edi
push 0
push 0
push 0
push 0
push pe_nt_image_headers32
lea ecx, [esp + 0x3c]
push eax
push ecx
push edx
call fcn.00559d00
add esp, 0x20
test eax, eax
jne 0x412b0e
mov eax, dword [0x65ca8c]
mov dword [esp + 0x18], eax
mov edx, dword [0x6614c8]
lea ecx, [esp + 0x78]
push ecx
push str.idmmzcc3
push edx
lea eax, [esp + 0x24]
push 0x638dcc
push eax
mov dword [esp + 0x194], 0
call fcn.0057f8fb
add esp, 0x14
lea ecx, [esp + 0x18]
push 0x6384b8
push 0x638dc8
call fcn.0057f31e
mov ecx, dword [0x65ca8c]
mov dword [esp + 0x14], ecx
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x14]
push edx
push 0x636fa0
push eax
mov byte [esp + 0x18c], 1
call fcn.0057f8fb
mov ecx, dword [esp + 0x20]
push 0x5c
push ecx
call fcn.0056aa30
add esp, 0x14
test eax, eax
je 0x412998
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov byte [eax + 1], 0
mov edx, dword [esp + 0x14]
push edx
call edi
cmp eax, 0xffffffff
jne 0x412998
push 3
push 0x5c
lea ecx, [esp + 0x1c]
call fcn.00586fa2
mov esi, eax
cmp esi, 0xffffffff
je 0x412998
mov ebp, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea eax, [esp + 0x24]
push esi
push eax
lea ecx, [esp + 0x1c]
call fcn.0057f4fd
mov eax, dword [eax]
push eax
call edi
cmp eax, 0xffffffff
lea ecx, [esp + 0x24]
sete bl
call fcn.00586b33
test bl, bl
je 0x412984
lea ecx, [esp + 0x20]
push esi
push ecx
lea ecx, [esp + 0x1c]
call fcn.0057f4fd
mov eax, dword [eax]
push 0
push eax
call ebp
test eax, eax
lea ecx, [esp + 0x20]
sete bl
call fcn.00586b33
test bl, bl
jne 0x412998
inc esi
lea ecx, [esp + 0x14]
push esi
push 0x5c
call fcn.00586fa2
mov esi, eax
cmp esi, 0xffffffff
jne 0x412935
push 0x2000
call fcn.0056b3a0
mov edi, eax
add esp, 4
test edi, edi
jne 0x4129d9
lea ecx, [esp + 0x14]
mov byte [esp + 0x180], al
call fcn.00586b33
lea ecx, [esp + 0x18]
mov dword [esp + 0x180], 0xffffffff
call fcn.00586b33
mov eax, 0xffffff98
jmp 0x412b0e
mov edx, dword [0x65ca8c]
mov byte [esp + 0x13], 0
mov dword [esp + 0x1c], edx
mov eax, dword [esp + 0x188]
mov byte [esp + 0x180], 2
push eax
call fcn.0055a1b0
mov esi, eax
add esp, 4
test esi, esi
jne 0x412ac0
mov ecx, dword [esp + 0x18]
push 0x638dc4
push ecx
call fcn.0056bf3f
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x412a53
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x1c]
push edx
push str._s
push eax
call fcn.0057f8fb
mov ecx, dword [esp + 0x28]
push 0x638dc4
push ecx
call fcn.0056bf3f
mov ebx, eax
add esp, 0x14
test ebx, ebx
je 0x412ac0
mov byte [esp + 0x13], 1
mov ebp, dword [esp + 0x188]
push 0x2000
push edi
push ebp
call fcn.0055a4f0
mov esi, eax
add esp, 0xc
test esi, esi
jl 0x412a9d
jle 0x412a9d
push ebx
push 1
push esi
push edi
call fcn.0056bdd5
add esp, 0x10
cmp eax, 1
jne 0x412a9a
push 0x2000
push edi
push ebp
call fcn.0055a4f0
mov esi, eax
add esp, 0xc
test esi, esi
jge 0x412a6f
jmp 0x412a9d
or esi, 0xffffffff
push ebx
call fcn.0056bd58
mov al, byte [esp + 0x17]
add esp, 4
test al, al
je 0x412ac0
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
push edx
push eax
call fcn.004125c0
add esp, 8
mov ecx, dword [esp + 0x188]
push ecx
call fcn.0055a6e0
push edi
call fcn.0056abb0
add esp, 8
lea ecx, [esp + 0x1c]
mov byte [esp + 0x180], 1
call fcn.00586b33
lea ecx, [esp + 0x14]
mov byte [esp + 0x180], 0
call fcn.00586b33
lea ecx, [esp + 0x18]
mov dword [esp + 0x180], 0xffffffff
call fcn.00586b33
mov eax, esi
mov ecx, dword [esp + 0x178]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x174
ret