Function at 0x405790
Capabilities:
Create directory
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x534d50
mov eax, dword fs:[0]
push eax
sub esp, 0x1a0
mov eax, dword [0x584cc0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0
push 0x66
mov ecx, esi
mov dword [ebp - 0x1a8], esi
call fcn.0041e8f1
mov dword [ebp - 4], 0
lea ecx, [esi + 0xbc]
mov dword [esi], vtable.CMainDlg.0
call fcn.00416eab
mov dword [esi + 0xbc], vtable.CIPAddressCtrl.0
lea ecx, [esi + 0x130]
mov byte [ebp - 4], 1
call fcn.00416eab
mov dword [esi + method.CComboBox.virtual_0], vtable.CComboBox.0
lea ecx, [esi + 0x1a4]
mov byte [ebp - 4], 2
call fcn.00416eab
mov dword [esi + method.CStatic.virtual_0], vtable.CStatic.0
lea ecx, [esi + 0x218]
mov byte [ebp - 4], 3
call fcn.00416eab
mov dword [esi + method.CButton.virtual_0], vtable.CButton.0
lea ecx, [esi + 0x28c]
call fcn.0040c950
mov byte [ebp - 4], 5
call fcn.0040fcc4
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x405864
push 0x80004005
call fcn.00401000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esi + 0x390], eax
mov byte [ebp - 4], 6
call fcn.0040fcc4
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x405894
push 0x80004005
call fcn.00401000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esi + 0x394], eax
mov byte [ebp - 4], 7
call fcn.0040fcc4
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4058c4
push 0x80004005
call fcn.00401000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esi + 0x398], eax
mov byte [ebp - 4], 8
call fcn.0040fcc4
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4058f4
push 0x80004005
call fcn.00401000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esi + 0x39c], eax
mov byte [ebp - 4], 9
call fcn.00421ee9
call fcn.00421ee9
mov eax, dword [eax + 0xc]
push 0x80
push eax
call dword [sym.imp.USER32.dll_LoadIconW]
lea ecx, [ebp - 0x118]
push ecx
push 0x104
mov dword [esi + 0xb8], eax
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
call fcn.0040fcc4
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x405955
push 0x80004005
call fcn.00401000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x190], eax
mov byte [ebp - 4], 0xa
call fcn.0040fcc4
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x405985
push 0x80004005
call fcn.00401000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x194], eax
lea eax, [ebp - 0x118]
mov byte [ebp - 4], 0xb
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4059a4
sub eax, edx
push eax
lea ecx, [ebp - 0x118]
push ecx
lea ecx, [esi + 0x390]
call fcn.00401ff0
cmp byte [ebp - 0x118], 0
je 0x405a37
push 1
lea edx, [ebp - 0x184]
push edx
lea ecx, [esi + 0x390]
call fcn.00405280
mov eax, dword [eax]
push 0x561388
push eax
call fcn.0050f254
add esp, 8
test eax, eax
mov eax, dword [ebp - 0x184]
setne byte [ebp - 0x179]
add eax, 0xfffffff0
or edi, 0xffffffff
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405a1a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp byte [ebp - 0x179], 0
je 0x405a3a
push 1
push 0x561388
lea ecx, [ebp - 0x194]
call fcn.00401ff0
jmp 0x405a3a
or edi, 0xffffffff
push 0
call fcn.0050fc0a
fldz
add esp, 4
fstp qword [ebp - 0x124]
lea ecx, [ebp - 0x188]
push ecx
lea ecx, [ebp - 0x124]
mov dword [ebp - 0x188], eax
mov dword [ebp - 0x184], edx
mov dword [ebp - 0x11c], 0
call fcn.004055c0
mov edx, dword [ebp - 0x124]
mov ecx, dword [ebp - 0x11c]
mov eax, dword [ebp - 0x120]
mov dword [ebp - 0x1a0], edx
lea edx, [ebp - 0x128]
mov dword [ebp - 0x198], ecx
push edx
lea ecx, [ebp - 0x1a0]
mov dword [ebp - 0x19c], eax
call fcn.00405580
test al, al
je 0x405abd
movzx eax, word [ebp - 0x11c]
mov dword [ebp - 0x1a4], eax
jmp 0x405ac3
mov dword [ebp - 0x1a4], edi
lea ecx, [ebp - 0x138]
push ecx
lea ecx, [ebp - 0x1a0]
call fcn.00405580
test al, al
je 0x405ae8
movzx edx, word [ebp - 0x12e]
mov dword [ebp - 0x180], edx
jmp 0x405aee
mov dword [ebp - 0x180], edi
lea eax, [ebp - 0x148]
push eax
lea ecx, [ebp - 0x1a0]
call fcn.00405580
test al, al
je 0x405b13
movzx ecx, word [ebp - 0x140]
mov dword [ebp - 0x18c], ecx
jmp 0x405b19
mov dword [ebp - 0x18c], edi
lea edx, [ebp - 0x158]
push edx
lea ecx, [ebp - 0x1a0]
call fcn.00405580
test al, al
je 0x405b3e
movzx eax, word [ebp - 0x152]
mov dword [ebp - 0x184], eax
jmp 0x405b44
mov dword [ebp - 0x184], edi
lea ecx, [ebp - 0x178]
push ecx
lea ecx, [ebp - 0x1a0]
call fcn.00405580
test al, al
je 0x405b61
movzx edi, word [ebp - 0x176]
lea edx, [ebp - 0x168]
push edx
lea ecx, [ebp - 0x1a0]
call fcn.00405580
test al, al
je 0x405b80
movzx eax, word [ebp - 0x168]
jmp 0x405b83
or eax, 0xffffffff
mov ecx, dword [ebp - 0x1a4]
mov edx, dword [ebp - 0x180]
push ecx
mov ecx, dword [ebp - 0x18c]
push edx
mov edx, dword [ebp - 0x184]
push ecx
push edx
push edi
push eax
lea eax, [ebp - 0x190]
push str.SNC_04d_02d_02d_02d_02d_02d
push eax
call fcn.0040b560
lea ecx, [ebp - 0x194]
push ecx
lea eax, [esi + 0x390]
push eax
lea edx, [ebp - 0x180]
push edx
call fcn.00403f60
add esp, 0x2c
lea ecx, [ebp - 0x190]
push ecx
push eax
lea edx, [ebp - 0x18c]
push edx
mov byte [ebp - 4], 0xc
call fcn.00403f60
add esp, 0xc
mov byte [ebp - 4], 0xd
mov ecx, dword [eax]
mov edi, dword [esi + 0x394]
lea eax, [ecx - 0x10]
sub edi, 0x10
cmp eax, edi
je 0x405c55
cmp dword [edi + 0xc], 0
jl 0x405c45
mov edx, dword [eax]
cmp edx, dword [edi]
jne 0x405c45
push eax
call fcn.004020f0
mov dword [ebp - 0x184], eax
add esp, 4
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x405c34
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
mov ecx, dword [ebp - 0x184]
add ecx, 0x10
mov dword [esi + 0x394], ecx
jmp 0x405c55
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [esi + 0x394]
call fcn.00401ff0
mov byte [ebp - 4], 0xc
mov eax, dword [ebp - 0x18c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x405c7b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0xb
mov eax, dword [ebp - 0x180]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405ca1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esi + 0x394]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov eax, dword [esi + 0x394]
push str.SNC_SRAM_CALIB
push eax
lea eax, [esi + 0x398]
push 0x561874
push eax
call fcn.0040b560
mov eax, dword [esi + 0x394]
push str.SNC_SRAM_CONFIG
push eax
lea eax, [esi + 0x39c]
push 0x561874
push eax
call fcn.0040b560
mov byte [ebp - 4], 0xa
mov eax, dword [ebp - 0x194]
add eax, 0xfffffff0
add esp, 0x20
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405d13
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 9
mov eax, dword [ebp - 0x190]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405d39
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0050ed6a
mov esp, ebp
pop ebp
ret