Function at 0x4022c0
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3b8
mov eax, dword [0x42d040]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x398], eax
lea eax, [ebp - 0x33c]
push 0x104
push eax
call fcn.00401440
add esp, 8
xor ecx, ecx
mov al, byte [ebp + ecx - 0x33c]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x235], al
test al, al
jne 0x4022f2
push esi
mov edx, str.payserver_log
push edi
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x402310
lea edi, [ebp - 0x234]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x402320
mov ecx, edx
lea eax, [ebp - 0x234]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
push 0
rep movsb byte es:[edi], byte [esi]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
xorps xmm0, xmm0
mov dword [ebp - 0x344], 0
lea ecx, [ebp - 0x234]
mov dword [ebp - 0x340], 0
movups xmmword [ebp - 0x354], xmm0
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402370
sub ecx, edx
lea eax, [ebp - 0x234]
push ecx
push eax
lea ecx, [ebp - 0x354]
call fcn.00401960
push 0x100000
lea eax, [ebp - 0x354]
mov ecx, 0x42de7c
push eax
call fcn.004094a0
mov ecx, dword [ebp - 0x340]
mov esi, eax
cmp ecx, 0xf
jbe 0x4023de
mov edx, dword [ebp - 0x354]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4023d4
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4029e7
push ecx
push edx
call fcn.0040a17a
add esp, 8
test esi, esi
jne 0x402409
push 0x10
push str.error
push str.Initializing_LogFile_fail
push esi
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a16c
mov esp, ebp
pop ebp
ret 0x10
push str.Sword3PaySys
push 1
mov ecx, 0x42de7c
call fcn.00409f80
xor ecx, ecx
nop dword [eax]
mov al, byte [ebp + ecx - 0x33c]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x12d], al
test al, al
jne 0x402420
lea ecx, [ebp - 0x12c]
dec ecx
nop dword [eax]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x402440
mov eax, dword [str.acc_setup.ini]
mov dword [ecx], eax
mov eax, dword [0x423394]
mov dword [ecx + 4], eax
mov eax, dword [0x423398]
mov dword [ecx + 8], eax
mov ax, word [0x42339c]
push ebx
push 0x138a
mov word [ecx + 0xc], ax
lea eax, [ebp - 0x24]
push 0x4233a0
push eax
call fcn.00402a00
lea eax, [ebp - 0x12c]
push eax
push 0x1f
lea eax, [ebp - 0x24]
push eax
push eax
push str.port
push str.Local
call fcn.004014a0
lea eax, [ebp - 0x24]
push eax
call fcn.004115d1
movzx eax, ax
mov dword [ebp - 0x384], eax
lea eax, [ebp - 0x12c]
push eax
push 0x1f
lea eax, [ebp - 0x24]
push eax
push 0x4233b4
push str.maxconnect
push str.Local
call fcn.004014a0
add esp, 0x40
lea eax, [ebp - 0x24]
push eax
call fcn.004115d1
mov dword [ebp - 0x388], eax
lea eax, [ebp - 0x12c]
push eax
push 0x1f
lea eax, [ebp - 0x24]
push eax
push 0x4233c4
push str.precision
push str.Local
call fcn.004014a0
lea eax, [ebp - 0x24]
push eax
call fcn.004115d1
mov edi, eax
lea eax, [ebp - 0x12c]
push eax
push 0x1f
lea eax, [ebp - 0x24]
push eax
push 0x4233d4
push str.maxbuffer
push str.Local
call fcn.004014a0
lea eax, [ebp - 0x24]
push eax
call fcn.004115d1
mov ebx, eax
lea eax, [ebp - 0x12c]
push eax
push 0x1f
lea eax, [ebp - 0x24]
push eax
push str.1048576
push str.sizebuffer
push str.Local
call fcn.004014a0
add esp, 0x54
lea eax, [ebp - 0x24]
push eax
call fcn.004115d1
mov dword [ebp - 0x37c], eax
lea eax, [ebp - 0x12c]
push eax
push 0x1f
lea eax, [ebp - 0x24]
push eax
push str.3000
push str.timelog
push str.Local
call fcn.004014a0
lea eax, [ebp - 0x24]
push eax
call fcn.004115d1
add esp, 0x20
mov dword [ebp - 0x39c], eax
mov dword [ebp - 0x370], 0
push str.heaven.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
mov dword [ebp - 0x38c], esi
test esi, esi
je 0x402671
push str.CreateInterface
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
lea ecx, [ebp - 0x378]
mov dword [ebp - 0x378], 0
push ecx
push 0x4232ec
call eax
test eax, eax
js 0x402671
mov eax, dword [ebp - 0x37c]
lea edx, [ebp - 0x390]
push edx
mov dword [ebp - 0x37c], eax
lea edx, [ebp - 0x37c]
mov eax, dword [ebp - 0x388]
push edx
mov dword [ebp - 0x374], eax
lea edx, [ebp - 0x394]
mov eax, dword [ebp - 0x378]
push edx
lea edx, [ebp - 0x380]
mov dword [ebp - 0x390], 0
push edx
mov dword [ebp - 0x394], ebx
lea edx, [ebp - 0x374]
mov dword [ebp - 0x380], edi
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0xc]
mov eax, dword [ebp - 0x378]
lea edx, [ebp - 0x370]
push edx
push 0x4232dc
push eax
mov ecx, dword [eax]
call dword [ecx + 0x10]
mov eax, dword [ebp - 0x378]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
xor ecx, ecx
mov al, byte [ebp + ecx - 0x33c]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x12d], al
test al, al
jne 0x402673
lea ecx, [ebp - 0x12c]
dec ecx
nop
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x402690
mov eax, dword [str.DataBase.ini]
mov dword [ecx], eax
mov eax, dword [0x423428]
mov dword [ecx + 4], eax
mov eax, dword [0x42342c]
mov dword [ecx + 8], eax
mov al, byte [0x423430]
mov byte [ecx + 0xc], al
lea eax, [ebp - 0x12c]
push eax
push 0x1f
lea eax, [ebp - 0x24]
push eax
push 0x423434
push str.DBConnects
push str.Local
call fcn.004014a0
lea eax, [ebp - 0x24]
push eax
call fcn.004115d1
add esp, 0x1c
mov edi, eax
call fcn.00404350
mov dword [ebp - 0x374], eax
call fcn.00404fc0
cmp dword [ebp - 0x370], 0
mov ebx, eax
mov dword [ebp - 0x380], ebx
jne 0x402722
push 0x10
push str.error
push str.Heaven.dll_Load_Error_
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x40297a
mov eax, dword [str.account]
lea ecx, [ebp - 0x12c]
mov dword [ebp - 0x354], eax
lea edx, [ecx + 1]
mov ax, word [0x423470]
xorps xmm0, xmm0
mov word [ebp - 0x350], ax
mov al, byte [0x423472]
movlpd qword [ebp - 0x34c], xmm0
mov dword [ebp - 0x344], 7
mov dword [ebp - 0x340], 0xf
mov byte [ebp - 0x34e], al
mov byte [ebp - 0x34d], 0
movups xmmword [ebp - 0x36c], xmm0
mov dword [ebp - 0x35c], 0
mov dword [ebp - 0x358], 0
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402790
sub ecx, edx
lea eax, [ebp - 0x12c]
push ecx
push eax
lea ecx, [ebp - 0x36c]
call fcn.00401960
mov ecx, dword [ebp - 0x374]
lea eax, [ebp - 0x354]
push edi
push eax
lea eax, [ebp - 0x36c]
push eax
call fcn.00404080
mov ecx, dword [ebp - 0x358]
mov edi, eax
cmp ecx, 0xf
jbe 0x402802
mov edx, dword [ebp - 0x36c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4027f8
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4029ec
push ecx
push edx
call fcn.0040a17a
add esp, 8
mov ecx, dword [ebp - 0x340]
mov dword [ebp - 0x35c], 0
mov dword [ebp - 0x358], 0xf
mov byte [ebp - 0x36c], 0
cmp ecx, 0xf
jbe 0x402857
mov edx, dword [ebp - 0x354]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40284d
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4029ec
push ecx
push edx
call fcn.0040a17a
add esp, 8
test edi, edi
jne 0x402873
push 0x10
push str.error
push str.Connect_DB_Error_
push edi
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x40297a
push dword [ebp - 0x388]
mov eax, dword [ebx]
mov ecx, ebx
push dword [ebp - 0x370]
call dword [eax + 8]
mov eax, dword [ebp - 0x370]
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
mov eax, dword [ebp - 0x370]
push 0x401d20
push ebx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x20]
mov ecx, dword [ebp - 0x384]
lea edx, [ebp - 0x384]
movzx eax, cx
mov dword [ebp - 0x384], eax
mov eax, dword [ebp - 0x370]
push edx
mov dword [ebp - 0x374], 0
lea edx, [ebp - 0x374]
push edx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
mov edi, dword [ebp - 0x398]
push 0x104
push 0x42dd68
push 0x6d
push edi
call dword [sym.imp.USER32.dll_LoadStringA]
push edi
call fcn.00401ca0
push dword [ebp - 0x39c]
push dword [ebp + 0x14]
push edi
call fcn.00401b80
add esp, 0x10
test eax, eax
je 0x402962
mov esi, dword [sym.imp.USER32.dll_GetMessageA]
lea eax, [ebp - 0x3b8]
push 0
push 0
push 0
push eax
call esi
test eax, eax
je 0x40295c
mov edi, dword [sym.imp.USER32.dll_TranslateMessage]
mov ebx, dword [sym.imp.USER32.dll_DispatchMessageA]
lea eax, [ebp - 0x3b8]
push eax
call edi
lea eax, [ebp - 0x3b8]
push eax
call ebx
push 0
push 0
push 0
lea eax, [ebp - 0x3b8]
push eax
call esi
test eax, eax
jne 0x402931
mov ebx, dword [ebp - 0x380]
mov esi, dword [ebp - 0x38c]
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 4]
push 0xe
push str.Nomal_exit____
mov ecx, 0x42de7c
call fcn.00409db0
call fcn.00405d40
call fcn.004043d0
mov ecx, dword [ebp - 0x370]
pop ebx
test ecx, ecx
je 0x4029ad
mov eax, dword [ecx]
push ecx
call dword [eax + 0x18]
mov eax, dword [ebp - 0x370]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x10]
mov eax, dword [ebp - 0x370]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
test esi, esi
je 0x4029b8
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push str.Sword3PaySys
push 0
mov ecx, 0x42de7c
call fcn.00409f80
mov ecx, 0x42de7c
call fcn.00409d10
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
xor ecx, ebp
pop esi
call fcn.0040a16c
mov esp, ebp
pop ebp
ret 0x10
call fcn.00410cd4
call fcn.00410cd4
int3