Function at 0x40a590
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x486ce6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x92c
mov eax, dword [0x4a872c]
mov dword [esp + 0x928], eax
mov al, byte [0x130f650]
push ebx
xor ebx, ebx
test al, al
je 0x40a5ca
xor eax, eax
jmp 0x40b5b7
mov eax, dword [esp + 0x940]
push esi
push eax
push 0x12e46c8
lea ecx, [esp + 0x638]
push str._s_game_d.sav
push ecx
mov dword [0x12e6f60], ebx
call fcn.00460b10
lea edx, [esp + 0x640]
push 1
push edx
call fcn.00438090
mov esi, eax
add esp, 0x18
xor eax, eax
cmp esi, ebx
je 0x40b5b6
mov dword [esp + 0x94], eax
mov dword [esp + 0x98], eax
mov dword [esp + 0x9c], eax
mov dword [esp + 0xa0], eax
mov dword [esp + 0xa4], eax
push edi
mov dword [esp + 0xac], eax
push 0x20
mov dword [esp + 0xb4], eax
lea ecx, [esp + 0x9c]
mov dword [esp + 0xb8], eax
push esi
push ecx
mov word [esp + 0xc4], ax
call fcn.00461030
mov eax, esi
add esp, 0xc
xor edi, edi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40a670
sub eax, edx
mov dword [esp + 0x30], eax
je 0x40a6b1
nop
cmp byte [edi + esi], 0x5b
je 0x40a6ad
mov eax, esi
inc edi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40a690
sub eax, edx
cmp edi, eax
jb 0x40a680
push esi
call fcn.00438020
add esp, 4
xor eax, eax
jmp 0x40b5b5
cmp edi, ebx
jne 0x40a6c1
push esi
call fcn.00438020
add esp, 4
xor eax, eax
jmp 0x40b5b5
lea edx, [esp + 0x594]
push 5
push edx
call fcn.0045ac10
mov eax, esi
add esp, 8
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40a6d8
sub eax, edx
sub eax, edi
push eax
add edi, esi
lea eax, [esp + 0x598]
push edi
push eax
call fcn.0045ac80
lea ecx, [esp + 0x60]
push ecx
lea edx, [esp + 0x10c]
push edx
lea eax, [esp + 0x5a8]
push eax
call fcn.0045ad10
lea ecx, [esp + 0x60c]
push ecx
lea edx, [esp + 0x118]
push 0x10
push edx
call fcn.0040dab0
lea eax, [esp + 0xbc]
push eax
lea ecx, [esp + 0x61c]
push ecx
call fcn.00460712
add esp, 0x2c
test eax, eax
push esi
jne 0x40a6b2
call fcn.00438020
add esp, 4
push ebx
lea edx, [esp + 0x638]
push edx
lea ecx, [esp + 0x114]
call fcn.0040b9a0
cmp dword [esp + 0x590], ebx
mov dword [esp + 0x940], ebx
lea ecx, [esp + 0x10c]
jne 0x40a791
mov dword [esp + 0x940], 0xffffffff
call fcn.0040b770
xor eax, eax
jmp 0x40b5b5
push ebp
push str.save_game
call fcn.0040bba0
push 0x200
lea eax, [esp + 0x73c]
push eax
push 0x489641
push str.episode
push ebx
lea ecx, [esp + 0x124]
call fcn.0040c450
mov edx, dword [0x12e4848]
xor edi, edi
cmp edx, ebx
mov dword [esp + 0x1c], ebx
jle 0x40a81b
mov ebp, 0x12e4890
mov esi, ebp
lea eax, [esp + 0x738]
mov edi, edi
mov bl, byte [eax]
mov cl, bl
cmp bl, byte [esi]
jne 0x40a804
test cl, cl
je 0x40a800
mov bl, byte [eax + 1]
mov cl, bl
cmp bl, byte [esi + 1]
jne 0x40a804
add eax, 2
add esi, 2
test cl, cl
jne 0x40a7e0
xor eax, eax
jmp 0x40a809
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40a817
inc edi
add ebp, 0x64
cmp edi, edx
jl 0x40a7d5
jmp 0x40a81b
mov dword [esp + 0x1c], edi
push 1
push str.hero
push 0
lea ecx, [esp + 0x11c]
call fcn.0040c510
push 0
push str.level_x
push 0
lea ecx, [esp + 0x11c]
mov dword [esp + 0x30], eax
call fcn.0040c510
push 0
push str.level_y
mov esi, eax
push 0
lea ecx, [esp + 0x11c]
mov dword [esp + 0x40], esi
call fcn.0040c510
push 0
push str.hero_x
mov edi, eax
push 0
lea ecx, [esp + 0x11c]
mov dword [esp + 0x44], edi
call fcn.0040c510
push 0
push str.hero_y
push 0
lea ecx, [esp + 0x11c]
mov ebx, eax
call fcn.0040c510
push 0
push 0x48a054
push 0
lea ecx, [esp + 0x11c]
mov ebp, eax
call fcn.0040c510
push 0
push str.defhp
push 0
lea ecx, [esp + 0x11c]
mov dword [esp + 0x20], eax
call fcn.0040c510
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x10], eax
cmp ecx, dword [0x12e7d38]
jne 0x40a8e5
mov edx, dword [0x1cf6b8c]
mov eax, dword [esp + 0x24]
cmp dword [edx + 0x18], eax
je 0x40a946
mov dword [0x12e4840], 0
call dword [sym.imp.WINMM.dll_timeGetTime]
mov dword [0x12e7cdc], eax
call fcn.00404690
call fcn.00433c40
mov ecx, 0x12e7ba0
call fcn.00426390
mov ecx, 0x12e7bb8
call fcn.00426390
call fcn.004290d0
call fcn.004067e0
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x24]
imul eax, eax, 0x64
push 1
push ecx
lea edx, [eax + 0x12e4850]
push edx
lea eax, [eax + 0x12e4890]
push eax
call fcn.00409160
add esp, 0x10
mov ecx, dword [esp + 0x24]
push 0
push ecx
push ebp
push ebx
push edi
push esi
call fcn.004046b0
push ebp
push ebx
push edi
push esi
call fcn.00431260
fild dword [esp + 0x3c]
mov edx, dword [0x1cf6b8c]
mov ecx, dword [esp + 0x44]
fstp dword [edx + 0x7c]
mov eax, dword [0x1cf6b8c]
fild dword [esp + 0x38]
add esp, 0x28
push 0
push str.score
fstp dword [eax + 0x80]
mov dword [0x12e7d38], ecx
push 0
lea ecx, [esp + 0x11c]
mov dword [0x4a15f4], 1
call fcn.0040c510
mov ebp, dword [0x12e7cc4]
push 0
push str.lives
xor eax, ebp
push 0
lea ecx, [esp + 0x11c]
mov dword [0x12e7cc0], eax
call fcn.0040c510
push 0
push str.keys
push 0
lea ecx, [esp + 0x11c]
mov dword [0x12e7cd0], eax
call fcn.0040c510
push 0
push str.mapFound
push 0
lea ecx, [esp + 0x11c]
mov dword [0x12e7cc8], eax
call fcn.0040c510
push 0
push str.compass
push 0
lea ecx, [esp + 0x11c]
mov dword [0x12e7ccc], eax
call fcn.0040c510
push 0
push str.pendant
push 0
lea ecx, [esp + 0x11c]
mov dword [0x12e7d2c], eax
call fcn.0040c510
push 0
push 0x4895a4
push 0
lea ecx, [esp + 0x11c]
mov dword [0x12e7d30], eax
call fcn.0040c510
push 0
push str.money_bet
push 0
lea ecx, [esp + 0x11c]
mov dword [0x12e7d28], eax
call fcn.0040c510
push 0
push str.money_won
push 0
lea ecx, [esp + 0x11c]
mov dword [0x12e7cfc], eax
call fcn.0040c510
push 0
mov dword [0x12e7d00], eax
push str.items
push 0
lea ecx, [esp + 0x11c]
call fcn.0040c510
push 0
push str.secret_items
push 0
lea ecx, [esp + 0x11c]
mov dword [0x12e7d3c], eax
call fcn.0040c510
push 0
push str.cheater
push 0
lea ecx, [esp + 0x11c]
mov dword [0x12e7d44], eax
call fcn.0040c510
push 0
push str.coins
push 0
lea ecx, [esp + 0x11c]
mov dword [0x12e7d10], eax
call fcn.0040c510
push 0
push str.artOnMap
push 0
lea ecx, [esp + 0x11c]
mov dword [0x12e7cf8], eax
call fcn.0040c510
test eax, eax
mov dword [0x12e7ce0], eax
je 0x40ab90
push 0
push str.artType
push 0
lea ecx, [esp + 0x11c]
call fcn.0040c510
push 0
push str.artWX
push 0
lea ecx, [esp + 0x11c]
mov dword [0x12e7ce4], eax
call fcn.0040c510
push 0
push str.artWY
push 0
lea ecx, [esp + 0x11c]
mov dword [0x12e7ce8], eax
call fcn.0040c510
push 0
push str.artX
push 0
lea ecx, [esp + 0x11c]
mov dword [0x12e7cec], eax
call fcn.0040c510
push 0
push str.artY
push 0
lea ecx, [esp + 0x11c]
mov dword [0x12e7cf0], eax
call fcn.0040c510
mov dword [0x12e7cf4], eax
push str.all_items
lea ecx, [esp + 0x114]
xor ebx, ebx
call fcn.0040bba0
mov ebp, dword [0x156ab94]
cmp ebp, dword [0x156ab9c]
mov dword [esp + 0x10], ebp
jge 0x40ad5f
lea eax, [ebp + ebp*4]
shl eax, 4
mov dword [esp + 0x14], eax
jmp 0x40abd0
mov esi, dword [0x156ab90]
cmp esi, dword [0x156ab98]
mov dword [esp + 0x30], esi
jge 0x40ad45
add eax, esi
lea edx, [eax*4 + 0x1cf6b90]
mov dword [esp + 0x20], edx
mov eax, dword [esp + 0x20]
mov edx, dword [eax]
cmp edx, ebx
mov dword [esp + 0x18], edx
je 0x40ad24
xor eax, eax
mov ecx, 0x1e00
lea edi, [edx + 0x6998]
rep stosd dword es:[edi], eax
cmp dword [0x15bae18], ebx
mov dword [esp + 0x24], ebx
jbe 0x40ad24
mov dword [esp + 0x1c], 0x15bae24
lea esp, [esp]
xor ebx, ebx
xor ebp, ebp
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x30]
push ebx
push ecx
push edx
push eax
lea ecx, [esp + 0xd0]
push str._d__d__d__d
push ecx
call fcn.00460b10
add esp, 0x18
push 0x40
lea edx, [esp + 0x60]
push edx
push 0x489641
lea eax, [esp + 0xcc]
push eax
push 0
lea ecx, [esp + 0x124]
inc ebx
call fcn.0040c450
lea eax, [esp + 0x5c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40ac83
sub eax, edx
mov dword [esp + 0x28], eax
je 0x40acf5
lea ecx, [esp + 0x5c]
push 0x48a690
push ecx
call fcn.00460a5b
push eax
call fcn.00460d5a
push 0x48a690
push 0
mov esi, eax
call fcn.00460a5b
push eax
call fcn.00460d5a
push 0x48a690
push 0
mov edi, eax
call fcn.00460a5b
push eax
call fcn.00460d5a
mov edx, dword [esp + 0x40]
mov ecx, dword [esp + 0x3c]
add esp, 0x24
push 0x5265c00
push eax
push edx
push edi
push esi
call fcn.0042f0a0
inc ebp
cmp ebp, 0x100
jl 0x40ac34
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x1c]
mov ecx, dword [0x15bae18]
inc eax
add edx, 0x1ce68
cmp eax, ecx
mov dword [esp + 0x24], eax
mov dword [esp + 0x1c], edx
jb 0x40ac30
mov ebp, dword [esp + 0x10]
mov esi, dword [esp + 0x30]
xor ebx, ebx
mov ecx, dword [esp + 0x20]
mov eax, dword [0x156ab98]
inc esi
add ecx, 4
cmp esi, eax
mov dword [esp + 0x30], esi
mov dword [esp + 0x20], ecx
jl 0x40abf3
mov eax, dword [esp + 0x14]
mov ecx, dword [0x156ab9c]
inc ebp
add eax, 0x50
cmp ebp, ecx
mov dword [esp + 0x10], ebp
mov dword [esp + 0x14], eax
jl 0x40abd0
mov eax, dword [0x12e7d58]
cmp eax, ebx
mov ebp, 0xf
je 0x40adb4
mov edi, dword [0x12e7d5c]
cmp eax, edi
je 0x40ada9
lea esi, [eax + 0x18]
xor ebx, ebx
lea esp, [esp]
cmp dword [esi], 0x10
jb 0x40ad91
mov eax, dword [esi - 0x14]
push eax
call fcn.0047e545
add esp, 4
mov dword [esi], ebp
mov dword [esi - 4], ebx
mov byte [esi - 0x14], 0
add esi, 0x1c
lea eax, [esi - 0x18]
cmp eax, edi
jne 0x40ad80
mov eax, dword [0x12e7d58]
push eax
call fcn.0047e545
add esp, 4
xor ebx, ebx
push str.completed_episodes
lea ecx, [esp + 0x114]
mov dword [0x12e7d58], ebx
mov dword [0x12e7d5c], ebx
mov dword [0x12e7d60], ebx
call fcn.0040bba0
xor ecx, ecx
mov dword [esp + 0x5d], ecx
mov dword [esp + 0x61], ecx
mov dword [esp + 0x65], ecx
mov dword [esp + 0x69], ecx
mov dword [esp + 0x6d], ecx
mov dword [esp + 0x71], ecx
mov dword [esp + 0x75], ecx
mov word [esp + 0x79], cx
lea eax, [esp + 0x5c]
mov byte [esp + 0x5c], 1
mov byte [esp + 0x7b], cl
xor esi, esi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40ae10
sub eax, edx
mov dword [esp + 0x18], eax
je 0x40af03
mov edi, 0x10
jmp 0x40ae30
push esi
lea edx, [esp + 0x60]
push str.EpisodeComplete_d
push edx
call fcn.00460b10
add esp, 0xc
push 0x20
lea eax, [esp + 0x60]
push eax
push 0x489641
mov ecx, eax
push ecx
push ebx
lea ecx, [esp + 0x124]
inc esi
call fcn.0040c450
lea eax, [esp + 0x5c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40ae67
sub eax, edx
mov dword [esp + 0x28], eax
je 0x40aee7
lea eax, [esp + 0x5c]
mov dword [esp + 0x54], ebp
mov dword [esp + 0x50], ebx
mov byte [esp + 0x40], cl
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40ae90
sub eax, edx
push eax
lea edx, [esp + 0x60]
push edx
lea ecx, [esp + 0x44]
call fcn.004018d0
lea eax, [esp + 0x3c]
push eax
mov ecx, 0x12e7d54
mov byte [esp + 0x948], 1
call fcn.00409e20
cmp dword [esp + 0x54], edi
mov byte [esp + 0x944], 0
jb 0x40aeda
mov ecx, dword [esp + 0x40]
push ecx
call fcn.0047e545
add esp, 4
mov dword [esp + 0x54], ebp
mov dword [esp + 0x50], ebx
mov byte [esp + 0x40], 0
lea eax, [esp + 0x5c]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40aef0
sub eax, edx
mov dword [esp + 0x18], eax
jne 0x40ae30
push str.visited_screens
lea ecx, [esp + 0x114]
call fcn.0040bba0
mov ebp, dword [0x156ab94]
cmp ebp, dword [0x156ab9c]
jge 0x40afb6
lea eax, [ebp + ebp*4]
shl eax, 4
mov dword [esp + 0x10], eax
mov esi, dword [0x156ab90]
cmp esi, dword [0x156ab98]
jge 0x40af9d
mov edx, dword [esp + 0x10]
lea ebx, [edx + esi]
lea ebx, [ebx*4 + 0x1cf6b90]
lea ecx, [ecx]
mov edi, dword [ebx]
test edi, edi
je 0x40af90
push ebp
push esi
lea eax, [esp + 0xc8]
push str._d__d
push eax
call fcn.00460b10
add esp, 0x10
push 0
lea ecx, [esp + 0xc4]
push ecx
push 0
lea ecx, [esp + 0x11c]
call fcn.0040c510
test eax, eax
je 0x40af90
mov dword [edi + 4], 1
mov eax, dword [0x156ab98]
inc esi
add ebx, 4
cmp esi, eax
jl 0x40af50
mov ecx, dword [esp + 0x10]
mov eax, dword [0x156ab9c]
inc ebp
add ecx, 0x50
cmp ebp, eax
mov dword [esp + 0x10], ecx
jl 0x40af31
push str.messages
lea ecx, [esp + 0x114]
call fcn.0040bba0
mov ebp, dword [0x156ab94]
cmp ebp, dword [0x156ab9c]
jge 0x40b086
lea eax, [ebp + ebp*4]
shl eax, 4
mov dword [esp + 0x20], eax
mov eax, dword [0x156ab98]
lea esp, [esp]
mov ebx, dword [0x156ab90]
cmp ebx, eax
jge 0x40b06c
mov edx, dword [esp + 0x20]
add edx, ebx
lea ecx, [edx*4 + 0x1cf6b90]
mov dword [esp + 0x10], ecx
jmp 0x40b010
mov edx, dword [esp + 0x10]
mov edi, dword [edx]
test edi, edi
je 0x40b05c
xor esi, esi
add edi, 0x6934
push esi
push ebp
push ebx
push str.Message__d__d__d
push 0x130f4c0
call fcn.00460b10
add esp, 0x14
push 0
push 0x130f4c0
push 0
lea ecx, [esp + 0x11c]
call fcn.0040c510
mov dword [edi], eax
inc esi
add edi, 0x18
cmp esi, 5
jl 0x40b022
mov eax, dword [0x156ab98]
mov edx, dword [esp + 0x10]
inc ebx
add edx, 4
cmp ebx, eax
mov dword [esp + 0x10], edx
jl 0x40b010
mov edx, dword [esp + 0x20]
mov ecx, dword [0x156ab9c]
inc ebp
add edx, 0x50
cmp ebp, ecx
mov dword [esp + 0x20], edx
jl 0x40aff0
push str.artefacts
lea ecx, [esp + 0x114]
call fcn.0040bba0
mov eax, dword [0xff06cc]
xor ebp, ebp
cmp eax, ebp
je 0x40b0ab
push eax
call fcn.0047e545
add esp, 4
mov ebx, dword [esp + 0x28]
mov dword [0xff06cc], ebp
mov dword [0xff06d0], ebp
mov dword [0xff06d4], ebp
xor edi, edi
push edi
push str.art_d_type
push 0x130f440
call fcn.00460b10
add esp, 0xc
push 0xffffffffffffffff
push 0x130f440
push ebp
lea ecx, [esp + 0x11c]
call fcn.0040c510
push edi
mov esi, eax
push str.art_d_equip
push 0x130f440
mov dword [esp + 0x34], esi
call fcn.00460b10
add esp, 0xc
push ebp
push 0x130f440
push ebp
lea ecx, [esp + 0x11c]
call fcn.0040c510
test eax, eax
setne al
cmp esi, 0xffffffff
mov byte [esp + 0x2c], al
je 0x40b17f
mov esi, dword [0xff06cc]
cmp esi, ebp
mov edx, dword [0xff06d0]
je 0x40b16d
mov ecx, dword [0xff06d4]
mov eax, edx
sub eax, esi
sub ecx, esi
sar eax, 3
sar ecx, 3
cmp eax, ecx
jae 0x40b16d
push ebx
push 0xff06c8
lea ecx, [esp + 0x30]
push ecx
push 1
push edx
mov esi, edx
call fcn.00401350
add esp, 0x14
add esi, 8
mov dword [0xff06d0], esi
jmp 0x40b17f
lea eax, [esp + 0x28]
push eax
push 1
push edx
mov ecx, 0xff06c8
call fcn.00401e80
inc edi
cmp edi, 0x12
jl 0x40b0c3
push 0x1d
call fcn.004015d0
mov esi, eax
add esp, 4
cmp esi, ebp
je 0x40b1cb
push ebp
push str.artSoulMode
push ebp
lea ecx, [esp + 0x11c]
call fcn.0040c510
push ebp
push str.artSoulValue
push ebp
lea ecx, [esp + 0x11c]
mov dword [esi + 0x1cdd8], eax
call fcn.0040c510
mov dword [esi + 0x1cddc], eax
push str.keys
lea ecx, [esp + 0x114]
call fcn.0040bba0
xor eax, eax
mov ecx, 0x780
mov edi, 0x1cf9db8
push str.KeyMain
rep stosd dword es:[edi], eax
call fcn.0042c350
add esp, 4
mov dword [esp + 0x10], eax
xor ebp, ebp
mov esi, 0x1cf9dd4
push ebp
lea ecx, [esp + 0xc4]
push str.key__d
push ecx
call fcn.00460b10
add esp, 0xc
push 0x40
lea edx, [esp + 0x60]
push edx
push 0x489641
lea eax, [esp + 0xcc]
push eax
push 0
lea ecx, [esp + 0x124]
call fcn.0040c450
lea eax, [esp + 0x5c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40b241
sub eax, edx
mov dword [esp + 0x28], eax
je 0x40b2fa
lea ecx, [esp + 0x5c]
push str.__._
push ecx
call fcn.00460a5b
push eax
call fcn.00460d5a
push str.__._
push 0
mov ebx, eax
call fcn.00460a5b
push eax
call fcn.00460d5a
push str.__._
push 0
mov edi, eax
call fcn.00460a5b
push eax
call fcn.00460d5a
push str.__._
push 0
mov dword [esp + 0x44], eax
call fcn.00460a5b
push eax
call fcn.00460d5a
lea edx, [edi + edi*4]
shl edx, 4
add edx, ebx
mov dword [esp + 0x44], eax
mov eax, dword [edx*4 + 0x1cf6b90]
add esp, 0x30
test eax, eax
je 0x40b2fa
push edi
push ebx
push ebp
push str.Load_key__d_at__d__d_n
call fcn.0040f390
fild dword [esp + 0x28]
mov eax, dword [esp + 0x20]
mov dword [esi - 0x18], 1
fstp dword [esi - 8]
mov dword [esi], ebx
fild dword [esp + 0x24]
mov dword [esi + 4], edi
add esp, 0x10
fstp dword [esi - 4]
mov ecx, dword [eax + 0x64]
mov dword [esi - 0xc], ecx
mov edx, dword [eax]
mov dword [esi - 0x10], edx
add esi, 0x78
inc ebp
cmp esi, 0x1cfbbd4
jl 0x40b202
mov esi, dword [0x1cf6b8c]
add esi, 0xa4
mov dword [esi], 0
xor edi, edi
mov eax, 4
lea ecx, [esp + 0x5c]
add esi, 4
sub eax, ecx
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], eax
jmp 0x40b340
push edi
lea edx, [esp + 0xc4]
push str.belt_slot__d
push edx
call fcn.00460b10
add esp, 0xc
lea eax, [esp + 0xc0]
push eax
lea ecx, [esp + 0x114]
call fcn.0040bba0
test eax, eax
je 0x40b3f6
push 0x40
lea ecx, [esp + 0x60]
push ecx
push 0x489641
push str.name
push 0
lea ecx, [esp + 0x124]
call fcn.0040c450
push 0
push str.item
push 0
lea ecx, [esp + 0x11c]
call fcn.0040c510
push 0
push str.mana
push 0
lea ecx, [esp + 0x11c]
mov ebx, eax
call fcn.0040c510
push 1
push str.level
push 0
lea ecx, [esp + 0x11c]
mov ebp, eax
call fcn.0040c510
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x5c]
lea edi, [edx + esi]
nop
mov dl, byte [ecx]
mov byte [ecx + edi], dl
inc ecx
test dl, dl
jne 0x40b3e0
mov edi, dword [esp + 0x14]
mov dword [esi], ebx
mov dword [esi + 0x28], ebp
mov dword [esi + 0x24], eax
inc edi
add esi, 0x30
cmp edi, 6
mov dword [esp + 0x14], edi
jl 0x40b340
mov eax, dword [0x1cf6b8c]
cmp dword [eax + 0x18], 1
mov esi, 0x1546c1c
je 0x40b41c
mov esi, 0x15466fc
mov dword [esi], 0
xor edi, edi
mov eax, 4
lea ecx, [esp + 0x5c]
add esi, 4
sub eax, ecx
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], eax
lea ebx, [ebx]
push edi
lea edx, [esp + 0xc4]
push str.belt_slot__d_2
push edx
call fcn.00460b10
add esp, 0xc
lea eax, [esp + 0xc0]
push eax
lea ecx, [esp + 0x114]
call fcn.0040bba0
test eax, eax
je 0x40b4f6
push 0x40
lea ecx, [esp + 0x60]
push ecx
push 0x489641
push str.name
push 0
lea ecx, [esp + 0x124]
call fcn.0040c450
push 0
push str.item
push 0
lea ecx, [esp + 0x11c]
call fcn.0040c510
push 0
push str.mana
push 0
lea ecx, [esp + 0x11c]
mov ebx, eax
call fcn.0040c510
push 1
push str.level
push 0
lea ecx, [esp + 0x11c]
mov ebp, eax
call fcn.0040c510
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x5c]
lea edi, [edx + esi]
nop
mov dl, byte [ecx]
mov byte [ecx + edi], dl
inc ecx
test dl, dl
jne 0x40b4e0
mov edi, dword [esp + 0x14]
mov dword [esi], ebx
mov dword [esi + 0x28], ebp
mov dword [esi + 0x24], eax
inc edi
add esi, 0x30
cmp edi, 6
mov dword [esp + 0x14], edi
jl 0x40b440
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x34]
lea eax, [eax + eax*4]
shl eax, 4
add eax, ecx
mov eax, dword [eax*4 + 0x1cf6b90]
mov dword [0x12e7d50], 1
lea edi, [eax + 0x6210]
mov ebx, 0x20
mov ebp, 7
mov esi, dword [edi]
test esi, esi
je 0x40b588
mov eax, dword [esi + 0x18]
test eax, eax
je 0x40b588
cmp eax, 1
je 0x40b588
cmp eax, 2
je 0x40b588
cmp dword [esi + 0x374], ebp
je 0x40b588
mov eax, dword [esi + 0x344]
test eax, eax
jne 0x40b588
push 6
call fcn.00401610
add esp, 4
test al, al
je 0x40b577
mov eax, dword [esi + 0x8c]
jmp 0x40b57d
mov eax, dword [esi + 0x90]
test eax, eax
je 0x40b588
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x14]
add edi, 4
dec ebx
jne 0x40b538
lea ecx, [esp + 0x110]
mov dword [0x12e7d50], 0
mov dword [esp + 0x944], 0xffffffff
call fcn.0040b770
mov eax, 1
pop ebp
pop edi
pop esi
mov ecx, dword [esp + 0x930]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x92c]
pop ebx
call fcn.00460704
add esp, 0x938
ret