Function at 0x40a970
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x808
push ebx
push esi
push edi
push ecx
lea edi, [ebp - 0x808]
mov ecx, 0x202
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
pop ecx
mov eax, dword [0x485010]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], ecx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
cmp dword [ecx + eax*4 + 0x6b854], 0
jne 0x40a9b2
jmp case.0x40b17d.1
push 0xff
push 0
lea eax, [ebp - 0x114]
push eax
call fcn.00418870
add esp, 0xc
push 0x1f4
push 0
lea eax, [ebp - 0x50c]
push eax
call fcn.00418870
add esp, 0xc
push 0x64
push 0
lea eax, [ebp - 0x578]
push eax
call fcn.00418870
add esp, 0xc
push 0xff
push 0
lea eax, [ebp - 0x6a8]
push eax
call fcn.00418870
add esp, 0xc
push 0x1f4
push 0
lea eax, [ebp - 0x310]
push eax
call fcn.00418870
add esp, 0xc
push 0xb
push 0
lea eax, [ebp - 0x58c]
push eax
call fcn.00418870
add esp, 0xc
push 0x15
push 0
lea eax, [ebp - 0x6c8]
push eax
call fcn.00418870
add esp, 0xc
push 0xb
push 0
lea eax, [ebp - 0x5a0]
push eax
call fcn.00418870
add esp, 0xc
mov eax, dword [ebp + 0xc]
add eax, 6
mov dword [ebp - 0x6d4], eax
push 0xa
mov eax, dword [ebp - 0x6d4]
push eax
lea ecx, [ebp - 0x58c]
push ecx
call fcn.00413650
add esp, 0xc
mov eax, dword [ebp - 0x6d4]
add eax, 0x1e
mov dword [ebp - 0x6d4], eax
push 0x14
mov eax, dword [ebp - 0x6d4]
push eax
lea ecx, [ebp - 0x6c8]
push ecx
call fcn.00413650
add esp, 0xc
mov eax, dword [ebp - 0x6d4]
add eax, 0x14
mov dword [ebp - 0x6d4], eax
push 0xa
mov eax, dword [ebp - 0x6d4]
push eax
lea ecx, [ebp - 0x5a0]
push ecx
call fcn.00413650
add esp, 0xc
mov eax, dword [ebp - 0x6d4]
add eax, 0xa
mov dword [ebp - 0x6d4], eax
mov eax, dword [ebp + 0xc]
add eax, 0x42
mov dword [ebp - 0x6e0], eax
mov eax, dword [ebp - 0x6e0]
mov ecx, dword [eax]
mov dword [ebp - 0x6ec], ecx
mov eax, dword [ebp - 0x6d4]
add eax, 4
mov dword [ebp - 0x6d4], eax
push str.NONE
lea eax, [ebp - 0x6c8]
push eax
call fcn.0041adb0
add esp, 8
test eax, eax
jne 0x40abb3
lea eax, [ebp - 0x300]
mov dword [ebp - 0x6d4], eax
lea eax, [ebp - 0x310]
mov dword [ebp - 0x6e0], eax
mov eax, dword [ebp - 0x6e0]
mov dword [eax], 0xfb516
lea eax, [ebp - 0x30c]
mov dword [ebp - 0x6f8], eax
mov eax, 0xf15
mov ecx, dword [ebp - 0x6f8]
mov word [ecx], ax
lea eax, [ebp - 0x30a]
mov dword [ebp - 0x6d4], eax
push 0xa
lea eax, [ebp - 0x58c]
push eax
mov ecx, dword [ebp - 0x6d4]
push ecx
call fcn.00413650
add esp, 0xc
mov eax, dword [ebp - 0x6d4]
add eax, 0xa
mov dword [ebp - 0x6d4], eax
push 0
push 0x10
lea eax, [ebp - 0x310]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + ecx*4 + 0x6b854]
mov ecx, dword [eax + 0x24]
call fcn.00417b20
mov dword [ebp - 0x704], eax
push str.Guild
lea eax, [ebp - 0x114]
push eax
call fcn.0041acc0
add esp, 8
push 0x46e9b4
lea eax, [ebp - 0x114]
push eax
call fcn.0041acc0
add esp, 8
mov eax, 1
imul ecx, eax, 0
movsx edx, byte [ebp + ecx - 0x6c8]
mov esi, esp
push edx
push str.AscII_d
lea eax, [ebp - 0x578]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
cmp esi, esp
call fcn.00418a80
lea eax, [ebp - 0x578]
push eax
lea ecx, [ebp - 0x114]
push ecx
call fcn.0041acc0
add esp, 8
lea eax, [ebp - 0x114]
push eax
lea ecx, [ebp - 0x6a8]
push ecx
call fcn.0041acc0
add esp, 8
push 0x46e9b4
lea eax, [ebp - 0x114]
push eax
call fcn.0041acc0
add esp, 8
push 0x46e9b4
lea eax, [ebp - 0x114]
push eax
call fcn.0041acc0
add esp, 8
lea eax, [ebp - 0x6c8]
push eax
lea ecx, [ebp - 0x114]
push ecx
call fcn.0041acc0
add esp, 8
push str..txt
lea eax, [ebp - 0x114]
push eax
call fcn.0041acc0
add esp, 8
push str.Guild
call fcn.0041d3e0
add esp, 4
lea eax, [ebp - 0x6a8]
push eax
call fcn.0041d3e0
add esp, 4
push 0x46e9c8
lea eax, [ebp - 0x114]
push eax
call fcn.0041ba10
add esp, 8
mov dword [ebp - 0x728], eax
cmp dword [ebp - 0x728], 0
je 0x40adb3
mov esi, esp
lea eax, [ebp - 0x114]
push eax
push str._X__Cannot_create_new_guild___Already_existing_guild_name:_Name__s_
lea ecx, [ebp - 0x578]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
cmp esi, esp
call fcn.00418a80
lea eax, [ebp - 0x578]
push eax
call fcn.00413cf0
add esp, 4
lea eax, [ebp - 0x300]
mov dword [ebp - 0x6d4], eax
lea eax, [ebp - 0x310]
mov dword [ebp - 0x6e0], eax
mov eax, dword [ebp - 0x6e0]
mov dword [eax], 0xfb516
lea eax, [ebp - 0x30c]
mov dword [ebp - 0x6f8], eax
mov eax, 0xf15
mov ecx, dword [ebp - 0x6f8]
mov word [ecx], ax
lea eax, [ebp - 0x30a]
mov dword [ebp - 0x6d4], eax
push 0xa
lea eax, [ebp - 0x58c]
push eax
mov ecx, dword [ebp - 0x6d4]
push ecx
call fcn.00413650
add esp, 0xc
mov eax, dword [ebp - 0x6d4]
add eax, 0xa
mov dword [ebp - 0x6d4], eax
push 0
push 0x10
lea eax, [ebp - 0x310]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + ecx*4 + 0x6b854]
mov ecx, dword [eax + 0x24]
call fcn.00417b20
mov dword [ebp - 0x704], eax
cmp dword [ebp - 0x728], 0
je 0x40adae
mov eax, dword [ebp - 0x728]
push eax
call fcn.0041b1b0
add esp, 4
jmp 0x40b149
push 0x46e5dc
lea eax, [ebp - 0x114]
push eax
call fcn.0041ba10
add esp, 8
mov dword [ebp - 0x728], eax
cmp dword [ebp - 0x728], 0
jne 0x40aeaa
mov esi, esp
lea eax, [ebp - 0x114]
push eax
push str._X__Cannot_create_new_guild___cannot_create_file_:_Name__s_
lea ecx, [ebp - 0x578]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
cmp esi, esp
call fcn.00418a80
lea eax, [ebp - 0x578]
push eax
call fcn.00413cf0
add esp, 4
lea eax, [ebp - 0x300]
mov dword [ebp - 0x6d4], eax
lea eax, [ebp - 0x310]
mov dword [ebp - 0x6e0], eax
mov eax, dword [ebp - 0x6e0]
mov dword [eax], 0xfb516
lea eax, [ebp - 0x30c]
mov dword [ebp - 0x6f8], eax
mov eax, 0xf15
mov ecx, dword [ebp - 0x6f8]
mov word [ecx], ax
lea eax, [ebp - 0x30a]
mov dword [ebp - 0x6d4], eax
push 0xa
lea eax, [ebp - 0x58c]
push eax
mov ecx, dword [ebp - 0x6d4]
push ecx
call fcn.00413650
add esp, 0xc
mov eax, dword [ebp - 0x6d4]
add eax, 0xa
mov dword [ebp - 0x6d4], eax
push 0
push 0x10
lea eax, [ebp - 0x310]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + ecx*4 + 0x6b854]
mov ecx, dword [eax + 0x24]
call fcn.00417b20
mov dword [ebp - 0x704], eax
jmp 0x40b149
mov esi, esp
lea eax, [ebp - 0x114]
push eax
push str._O__New_guild_created_:_Name__s_
lea ecx, [ebp - 0x578]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
cmp esi, esp
call fcn.00418a80
lea eax, [ebp - 0x578]
push eax
call fcn.00413cf0
add esp, 4
push 0x64
push 0
lea eax, [ebp - 0x578]
push eax
call fcn.00418870
add esp, 0xc
push 0x1f4
push 0
lea eax, [ebp - 0x50c]
push eax
call fcn.00418870
add esp, 0xc
mov esi, esp
lea eax, [ebp - 0x71c]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
cmp esi, esp
call fcn.00418a80
movzx eax, word [ebp - 0x712]
mov esi, esp
push eax
movzx ecx, word [ebp - 0x714]
push ecx
movzx edx, word [ebp - 0x716]
push edx
movzx eax, word [ebp - 0x71a]
push eax
movzx ecx, word [ebp - 0x71c]
push ecx
push str._Guild_file___Updated__4d__2d__2d__2d__2d
lea edx, [ebp - 0x50c]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x1c
cmp esi, esp
call fcn.00418a80
push 0x46e614
lea eax, [ebp - 0x50c]
push eax
call fcn.0041acc0
add esp, 8
push str._GUILD_INFO__n_n
lea eax, [ebp - 0x50c]
push eax
call fcn.0041acc0
add esp, 8
push str.guildmaster_name_____
lea eax, [ebp - 0x50c]
push eax
call fcn.0041acc0
add esp, 8
lea eax, [ebp - 0x58c]
push eax
lea ecx, [ebp - 0x50c]
push ecx
call fcn.0041acc0
add esp, 8
push 0x46e614
lea eax, [ebp - 0x50c]
push eax
call fcn.0041acc0
add esp, 8
push str.guild_GUID___________
lea eax, [ebp - 0x50c]
push eax
call fcn.0041acc0
add esp, 8
mov esi, esp
mov eax, dword [ebp - 0x6ec]
push eax
push 0x46e504
lea ecx, [ebp - 0x578]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
cmp esi, esp
call fcn.00418a80
lea eax, [ebp - 0x578]
push eax
lea ecx, [ebp - 0x50c]
push ecx
call fcn.0041acc0
add esp, 8
push 0x46e614
lea eax, [ebp - 0x50c]
push eax
call fcn.0041acc0
add esp, 8
push str.guild_location_______
lea eax, [ebp - 0x50c]
push eax
call fcn.0041acc0
add esp, 8
lea eax, [ebp - 0x5a0]
push eax
lea ecx, [ebp - 0x50c]
push ecx
call fcn.0041acc0
add esp, 8
push 0x46ee20
lea eax, [ebp - 0x50c]
push eax
call fcn.0041acc0
add esp, 8
push str._GUILDSMAN__n
lea eax, [ebp - 0x50c]
push eax
call fcn.0041acc0
add esp, 8
mov eax, dword [ebp - 0x728]
push eax
lea ecx, [ebp - 0x50c]
push ecx
call fcn.004190a0
add esp, 4
push eax
push 1
lea edx, [ebp - 0x50c]
push edx
call fcn.0041d100
add esp, 0x10
lea eax, [ebp - 0x310]
mov dword [ebp - 0x6e0], eax
mov eax, dword [ebp - 0x6e0]
mov dword [eax], 0xfb516
lea eax, [ebp - 0x30c]
mov dword [ebp - 0x6f8], eax
mov eax, 0xf14
mov ecx, dword [ebp - 0x6f8]
mov word [ecx], ax
lea eax, [ebp - 0x30a]
mov dword [ebp - 0x6d4], eax
push 0xa
lea eax, [ebp - 0x58c]
push eax
mov ecx, dword [ebp - 0x6d4]
push ecx
call fcn.00413650
add esp, 0xc
mov eax, dword [ebp - 0x6d4]
add eax, 0xa
mov dword [ebp - 0x6d4], eax
push 0
push 0x10
lea eax, [ebp - 0x310]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + ecx*4 + 0x6b854]
mov ecx, dword [eax + 0x24]
call fcn.00417b20
mov dword [ebp - 0x704], eax
cmp dword [ebp - 0x728], 0
je 0x40b149
mov eax, dword [ebp - 0x728]
push eax
call fcn.0041b1b0
add esp, 4
mov eax, dword [ebp - 0x704]
mov dword [ebp - 0x808], eax
mov ecx, dword [ebp - 0x808]
add ecx, 0x86
mov dword [ebp - 0x808], ecx
cmp dword [ebp - 0x808], 7
ja case.0x40b17d.1
mov edx, dword [ebp - 0x808]
movzx eax, byte [edx + 0x40b2f0]
jmp dword [eax*4 + 0x40b2e8]
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + eax*4 + 0x6b854]
mov dword [ebp - 0x7f4], edx
mov eax, dword [ebp - 0x7f4]
mov dword [ebp - 0x800], eax
cmp dword [ebp - 0x800], 0
je 0x40b1d1
mov esi, esp
push 1
mov ecx, dword [ebp - 0x800]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x800]
mov eax, dword [edx]
call eax
cmp esi, esp
call fcn.00418a80
mov dword [ebp - 0x808], eax
jmp 0x40b1db
mov dword [ebp - 0x808], 0
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword [ecx + eax*4 + 0x6b854], 0
push edx
mov ecx, ebp
push eax
lea edx, [0x40b220]
call fcn.00418a20
pop eax
pop edx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00419b10
add esp, 0x808
cmp ebp, esp
call fcn.00418a80
mov esp, ebp
pop ebp
ret 8