Function at 0x402310
Capabilities:
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x40f17b
mov eax, dword fs:[0]
push eax
sub esp, 0x2b0
mov eax, dword [0x419050]
xor eax, esp
mov dword [esp + 0x2ac], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x419050]
xor eax, esp
push eax
lea eax, [esp + 0x2c4]
mov dword fs:[0], eax
mov eax, dword [esp + 0x2d8]
mov esi, dword [esp + 0x2d4]
lea ecx, [esp + 0xac]
mov dword [esp + 0x48], esi
mov dword [esp + 0xa8], eax
call fcn.00401000
push 1
push esi
lea ecx, [esp + 0xb4]
mov dword [esp + 0x2d4], 0
call fcn.00401400
test al, al
je 0x4023b3
mov eax, dword [esp + 0xbc]
mov ecx, dword [eax + 0xc]
lea edi, [ecx + eax + 8]
mov dword [esp + 0x40], edi
test edi, edi
jne 0x4023d1
push esi
push str.Cant_find_cells_in__s_n
call dword [sym.imp.MSVCR90.dll_printf]
add esp, 8
lea ecx, [esp + 0xac]
mov dword [esp + 0x2cc], 0xffffffff
call fcn.00401030
xor al, al
jmp 0x4038b3
push 0x4000
push 0
push 0x419090
call sub.MSVCR90.dll_memset
push 0x100
push 0
push 0x421290
call sub.MSVCR90.dll_memset
push 0x200
push 0
push 0x455eb0
call sub.MSVCR90.dll_memset
mov edx, dword [str.MAPS]
mov eax, dword [edx]
mov ecx, dword [str.v1.3]
mov dword [esp + 0xa0], eax
mov edx, dword [ecx]
mov eax, dword [esp + 0x308]
mov dword [esp + 0xa8], eax
add esp, 0x24
mov dword [esp + 0x80], edx
mov eax, 0x421090
lea ecx, [edi + 8]
jmp 0x402440
mov esi, eax
mov edi, ecx
mov ebx, 0x10
lea esp, [esp]
mov eax, dword [edi]
test eax, eax
je 0x402460
mov ecx, dword [esp + 0x40]
lea ecx, [eax + ecx - 0x54]
jmp 0x402462
xor ecx, ecx
mov eax, dword [ecx + 0x3c]
test eax, eax
je 0x4024a6
cmp eax, dword [0x4660b4]
ja 0x4024a6
mov edx, dword [0x44deac]
movzx edx, word [edx + eax*2]
mov ebp, 0xffff
cmp dx, bp
je 0x40248a
mov word [esi], dx
jmp 0x4024ae
mov edx, dword [ecx + 0x10]
mov ecx, dword [ecx + 0xc]
push edx
mov edx, dword [esp + 0x4c]
push ecx
push eax
push edx
push str.File:__s_nCant_find_area_flag_for_areaid__u___d___d_._n
call dword [sym.imp.MSVCR90.dll_printf]
add esp, 0x14
mov eax, 0xffff
mov word [esi], ax
add edi, 0x10
add esi, 2
sub ebx, 1
jne 0x402450
cmp esi, 0x421290
mov eax, esi
mov ecx, edi
jl 0x402440
movzx esi, word [0x421090]
xor bl, bl
mov edx, 0x421090
xor edi, edi
lea esp, [esp]
xor eax, eax
mov ecx, edx
movzx ebp, word [ecx]
cmp ebp, esi
jne 0x4024f6
inc eax
add ecx, 2
cmp eax, 0x10
jl 0x4024e4
jmp 0x4024f8
mov bl, 1
add edx, 0x20
cmp edx, 0x421290
jl 0x4024e0
mov ecx, dword [str.AREA]
mov dword [esp + 0x88], 0x2c
mov dword [esp + 0x8c], 8
mov edx, dword [ecx]
xor eax, eax
mov dword [esp + 0x6c], edx
mov word [esp + 0x70], ax
test bl, bl
je 0x402544
xor ecx, ecx
mov word [esp + 0x72], cx
mov dword [esp + 0x8c], 0x208
jmp 0x402553
mov edx, 1
mov word [esp + 0x70], dx
mov word [esp + 0x72], si
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x24], edi
mov dword [esp + 0x20], edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x18], edi
add ecx, 8
lea ebx, [ebx]
xor ebp, ebp
lea eax, [ebp + 1]
mov dword [esp + 0x28], ecx
lea esp, [esp]
mov ecx, dword [esp + 0x28]
mov ecx, dword [ecx]
test ecx, ecx
je 0x402995
mov edx, dword [esp + 0x40]
lea ecx, [ecx + edx - 0x54]
test ecx, ecx
je 0x402995
mov edx, dword [esp + 0x18]
mov esi, dword [esp + 0x20]
add edx, ebp
shl edx, 5
add edx, 0x43daac
mov edi, 9
fld dword [ecx + 0x78]
lea ebx, [esi + eax + 7]
fstp dword [edx - 4]
add esi, 0x81
fld dword [ecx + 0x78]
add edx, 0x204
sub edi, 1
fstp dword [edx - 0x204]
fld dword [ecx + 0x78]
fstp dword [edx - 0x200]
fld dword [ecx + 0x78]
fstp dword [edx - 0x1fc]
fld dword [ecx + 0x78]
fstp dword [edx - 0x1f8]
fld dword [ecx + 0x78]
fstp dword [edx - 0x1f4]
fld dword [ecx + 0x78]
fstp dword [edx - 0x1f0]
fld dword [ecx + 0x78]
fstp dword [edx - 0x1ec]
fld dword [ecx + 0x78]
fstp dword [ebx*4 + 0x43daa8]
jne 0x4025b6
mov edx, dword [esp + 0x1c]
mov esi, dword [esp + 0x24]
add edx, ebp
shl edx, 5
add edx, 0x4560b4
mov edi, 8
fld dword [ecx + 0x78]
lea ebx, [esi + eax + 6]
fstp dword [edx - 4]
add edx, 0x200
fld dword [ecx + 0x78]
sub esi, 0xffffff80
sub edi, 1
fstp dword [edx - 0x200]
fld dword [ecx + 0x78]
fstp dword [edx - 0x1fc]
fld dword [ecx + 0x78]
fstp dword [edx - 0x1f8]
fld dword [ecx + 0x78]
fstp dword [edx - 0x1f4]
fld dword [ecx + 0x78]
fstp dword [edx - 0x1f0]
fld dword [ecx + 0x78]
fstp dword [edx - 0x1ec]
fld dword [ecx + 0x78]
fstp dword [ebx*4 + 0x4560b0]
jne 0x402632
mov edx, dword [ecx + 0x1c]
test edx, edx
je 0x402995
lea ebx, [edx + ecx]
test ebx, ebx
je 0x402995
mov ecx, dword [esp + 0x20]
lea edx, [ebx + 0xc]
mov edi, 9
lea esp, [esp]
movss xmm0, dword [edx - 4]
cvtps2pd xmm0, xmm0
lea esi, [ecx + eax - 1]
movss xmm1, dword [esi*4 + 0x43daa8]
cvtps2pd xmm1, xmm1
addsd xmm0, xmm1
cvtpd2ps xmm0, xmm0
movss dword [esi*4 + 0x43daa8], xmm0
movss xmm0, dword [edx]
cvtps2pd xmm0, xmm0
lea esi, [ecx + eax]
movss xmm1, dword [esi*4 + 0x43daa8]
cvtps2pd xmm1, xmm1
addsd xmm0, xmm1
cvtpd2ps xmm0, xmm0
movss dword [esi*4 + 0x43daa8], xmm0
movss xmm0, dword [edx + 4]
cvtps2pd xmm0, xmm0
lea esi, [ecx + eax + 1]
movss xmm1, dword [esi*4 + 0x43daa8]
cvtps2pd xmm1, xmm1
addsd xmm0, xmm1
cvtpd2ps xmm0, xmm0
movss dword [esi*4 + 0x43daa8], xmm0
movss xmm0, dword [edx + 8]
cvtps2pd xmm0, xmm0
lea esi, [ecx + eax + 2]
movss xmm1, dword [esi*4 + 0x43daa8]
cvtps2pd xmm1, xmm1
addsd xmm0, xmm1
cvtpd2ps xmm0, xmm0
movss dword [esi*4 + 0x43daa8], xmm0
movss xmm0, dword [edx + 0xc]
cvtps2pd xmm0, xmm0
lea esi, [ecx + eax + 3]
movss xmm1, dword [esi*4 + 0x43daa8]
cvtps2pd xmm1, xmm1
addsd xmm0, xmm1
cvtpd2ps xmm0, xmm0
movss dword [esi*4 + 0x43daa8], xmm0
movss xmm0, dword [edx + 0x10]
cvtps2pd xmm0, xmm0
lea esi, [ecx + eax + 4]
movss xmm1, dword [esi*4 + 0x43daa8]
cvtps2pd xmm1, xmm1
addsd xmm0, xmm1
cvtpd2ps xmm0, xmm0
movss dword [esi*4 + 0x43daa8], xmm0
movss xmm0, dword [edx + 0x14]
cvtps2pd xmm0, xmm0
lea esi, [ecx + eax + 5]
movss xmm1, dword [esi*4 + 0x43daa8]
cvtps2pd xmm1, xmm1
addsd xmm0, xmm1
cvtpd2ps xmm0, xmm0
movss dword [esi*4 + 0x43daa8], xmm0
movss xmm0, dword [edx + 0x18]
lea esi, [ecx + eax + 6]
movss xmm1, dword [esi*4 + 0x43daa8]
cvtps2pd xmm0, xmm0
cvtps2pd xmm1, xmm1
addsd xmm0, xmm1
cvtpd2ps xmm0, xmm0
movss dword [esi*4 + 0x43daa8], xmm0
movss xmm0, dword [edx + 0x1c]
lea esi, [ecx + eax + 7]
movss xmm1, dword [esi*4 + 0x43daa8]
cvtps2pd xmm0, xmm0
cvtps2pd xmm1, xmm1
addsd xmm0, xmm1
add ecx, 0x81
add edx, 0x44
sub edi, 1
cvtpd2ps xmm0, xmm0
movss dword [esi*4 + 0x43daa8], xmm0
jne 0x4026b0
mov ecx, dword [esp + 0x24]
lea edx, [ebx + 0x30]
mov edi, 8
lea ecx, [ecx]
movss xmm0, dword [edx - 4]
cvtps2pd xmm0, xmm0
lea esi, [ecx + eax - 1]
movss xmm1, dword [esi*4 + 0x4560b0]
cvtps2pd xmm1, xmm1
addsd xmm0, xmm1
cvtpd2ps xmm0, xmm0
movss dword [esi*4 + 0x4560b0], xmm0
movss xmm0, dword [edx]
cvtps2pd xmm0, xmm0
lea esi, [ecx + eax]
movss xmm1, dword [esi*4 + 0x4560b0]
cvtps2pd xmm1, xmm1
addsd xmm0, xmm1
cvtpd2ps xmm0, xmm0
movss dword [esi*4 + 0x4560b0], xmm0
movss xmm0, dword [edx + 4]
cvtps2pd xmm0, xmm0
lea esi, [ecx + eax + 1]
movss xmm1, dword [esi*4 + 0x4560b0]
cvtps2pd xmm1, xmm1
addsd xmm0, xmm1
cvtpd2ps xmm0, xmm0
movss dword [esi*4 + 0x4560b0], xmm0
movss xmm0, dword [edx + 8]
cvtps2pd xmm0, xmm0
lea esi, [ecx + eax + 2]
movss xmm1, dword [esi*4 + 0x4560b0]
cvtps2pd xmm1, xmm1
addsd xmm0, xmm1
cvtpd2ps xmm0, xmm0
movss dword [esi*4 + 0x4560b0], xmm0
movss xmm0, dword [edx + 0xc]
cvtps2pd xmm0, xmm0
lea esi, [ecx + eax + 3]
movss xmm1, dword [esi*4 + 0x4560b0]
cvtps2pd xmm1, xmm1
addsd xmm0, xmm1
cvtpd2ps xmm0, xmm0
movss dword [esi*4 + 0x4560b0], xmm0
movss xmm0, dword [edx + 0x10]
cvtps2pd xmm0, xmm0
lea esi, [ecx + eax + 4]
movss xmm1, dword [esi*4 + 0x4560b0]
cvtps2pd xmm1, xmm1
addsd xmm0, xmm1
cvtpd2ps xmm0, xmm0
movss dword [esi*4 + 0x4560b0], xmm0
movss xmm0, dword [edx + 0x14]
lea esi, [ecx + eax + 5]
movss xmm1, dword [esi*4 + 0x4560b0]
cvtps2pd xmm0, xmm0
cvtps2pd xmm1, xmm1
addsd xmm0, xmm1
cvtpd2ps xmm0, xmm0
movss dword [esi*4 + 0x4560b0], xmm0
movss xmm0, dword [edx + 0x18]
lea esi, [ecx + eax + 6]
movss xmm1, dword [esi*4 + 0x4560b0]
cvtps2pd xmm0, xmm0
cvtps2pd xmm1, xmm1
addsd xmm0, xmm1
sub ecx, 0xffffff80
add edx, 0x44
sub edi, 1
cvtpd2ps xmm0, xmm0
movss dword [esi*4 + 0x4560b0], xmm0
jne 0x402840
add dword [esp + 0x28], 0x10
add eax, 8
inc ebp
cmp eax, 0x81
jl 0x402580
mov eax, dword [esp + 0x18]
sub dword [esp + 0x1c], 0xffffff80
add dword [esp + 0x20], 0x408
add dword [esp + 0x24], 0x400
mov ecx, dword [esp + 0x28]
add eax, 0x81
cmp eax, 0x810
mov dword [esp + 0x18], eax
jl 0x402570
movss xmm1, dword [0x4107c4]
movss xmm0, dword [0x4107c0]
mov eax, 0x4560b4
nop
mov ecx, 0x20
jmp 0x402a00
movss xmm2, dword [eax - 4]
cvtss2sd xmm3, xmm1
cvtps2pd xmm4, xmm2
comisd xmm4, xmm3
jbe 0x402a15
movaps xmm1, xmm2
cvtss2sd xmm3, xmm0
cvtps2pd xmm4, xmm2
comisd xmm3, xmm4
jbe 0x402a25
movaps xmm0, xmm2
movss xmm2, dword [eax]
cvtss2sd xmm3, xmm1
cvtps2pd xmm4, xmm2
comisd xmm4, xmm3
jbe 0x402a39
movaps xmm1, xmm2
cvtss2sd xmm3, xmm0
cvtps2pd xmm4, xmm2
comisd xmm3, xmm4
jbe 0x402a49
movaps xmm0, xmm2
movss xmm2, dword [eax + 4]
cvtss2sd xmm3, xmm1
cvtps2pd xmm4, xmm2
comisd xmm4, xmm3
jbe 0x402a5e
movaps xmm1, xmm2
cvtss2sd xmm3, xmm0
cvtps2pd xmm4, xmm2
comisd xmm3, xmm4
jbe 0x402a6e
movaps xmm0, xmm2
movss xmm2, dword [eax + 8]
cvtss2sd xmm3, xmm1
cvtps2pd xmm4, xmm2
comisd xmm4, xmm3
jbe 0x402a83
movaps xmm1, xmm2
cvtss2sd xmm3, xmm0
cvtps2pd xmm4, xmm2
comisd xmm3, xmm4
jbe 0x402a93
movaps xmm0, xmm2
add eax, 0x10
sub ecx, 1
jne 0x402a00
cmp eax, 0x4660b4
jl 0x4029f0
mov eax, 0x43daac
nop
mov ecx, 0x2b
jmp 0x402ac0
movss xmm2, dword [eax - 4]
cvtss2sd xmm3, xmm1
cvtps2pd xmm4, xmm2
comisd xmm4, xmm3
jbe 0x402ad5
movaps xmm1, xmm2
cvtss2sd xmm3, xmm0
cvtps2pd xmm4, xmm2
comisd xmm3, xmm4
jbe 0x402ae5
movaps xmm0, xmm2
movss xmm2, dword [eax]
cvtss2sd xmm3, xmm1
cvtps2pd xmm4, xmm2
comisd xmm4, xmm3
jbe 0x402af9
movaps xmm1, xmm2
cvtss2sd xmm3, xmm0
cvtps2pd xmm4, xmm2
comisd xmm3, xmm4
jbe 0x402b09
movaps xmm0, xmm2
movss xmm2, dword [eax + 4]
cvtss2sd xmm3, xmm1
cvtps2pd xmm4, xmm2
comisd xmm4, xmm3
jbe 0x402b1e
movaps xmm1, xmm2
cvtss2sd xmm3, xmm0
cvtps2pd xmm4, xmm2
comisd xmm3, xmm4
jbe 0x402b2e
movaps xmm0, xmm2
add eax, 0xc
sub ecx, 1
jne 0x402ac0
cmp eax, 0x44dcac
jle 0x402ab0
cmp byte [0x418200], cl
je 0x402beb
movss xmm2, dword [0x418204]
cvtss2sd xmm3, xmm0
cvtps2pd xmm4, xmm2
comisd xmm4, xmm3
jbe 0x402beb
mov eax, 0x4560b0
jmp 0x402b70
mov ecx, 0x80
movss xmm3, dword [eax]
cvtps2pd xmm3, xmm3
cvtss2sd xmm4, xmm2
comisd xmm4, xmm3
jbe 0x402b8a
movss dword [eax], xmm2
add eax, 4
sub ecx, 1
jne 0x402b75
cmp eax, 0x4660b0
jl 0x402b70
mov eax, 0x43daa8
mov edi, edi
mov ecx, 0x81
movss xmm3, dword [eax]
cvtps2pd xmm3, xmm3
cvtss2sd xmm4, xmm2
comisd xmm4, xmm3
jbe 0x402bba
movss dword [eax], xmm2
add eax, 4
sub ecx, 1
jne 0x402ba5
cmp eax, 0x44dca8
jle 0x402ba0
cvtss2sd xmm3, xmm0
cvtss2sd xmm4, xmm2
comisd xmm4, xmm3
jbe 0x402bda
movaps xmm0, xmm2
cvtss2sd xmm3, xmm1
cvtss2sd xmm4, xmm2
comisd xmm4, xmm3
jbe 0x402beb
movaps xmm1, xmm2
mov eax, dword [esp + 0x8c]
mov ecx, dword [str.MHGT]
add eax, 0x2c
xor ebp, ebp
mov dword [esp + 0x90], eax
cvtss2sd xmm2, xmm1
cvtss2sd xmm3, xmm0
ucomisd xmm2, xmm3
lahf
mov dword [esp + 0x94], 0x10
mov edx, dword [ecx]
mov dword [esp + 0x5c], edx
mov dword [esp + 0x60], ebp
movss dword [esp + 0x64], xmm0
movss dword [esp + 0x68], xmm1
test ah, 0x44
jp 0x402c3f
mov dword [esp + 0x60], 1
mov al, byte [0x418201]
test al, al
je 0x402c6a
cvtss2sd xmm3, xmm0
cvtss2sd xmm2, xmm1
subsd xmm2, xmm3
movss xmm3, dword [0x418210]
cvtps2pd xmm3, xmm3
comisd xmm3, xmm2
jbe 0x402c6a
or dword [esp + 0x60], 1
test byte [esp + 0x60], 1
jne 0x402e5c
xorps xmm2, xmm2
test al, al
je 0x402cde
movss xmm4, dword [0x418208]
cvtss2sd xmm1, xmm1
cvtss2sd xmm3, xmm0
subsd xmm1, xmm3
cvtsd2ss xmm1, xmm1
cvtss2sd xmm3, xmm1
cvtps2pd xmm4, xmm4
comisd xmm4, xmm3
jbe 0x402cb0
or dword [esp + 0x60], 4
movsd xmm2, qword [0x410700]
jmp 0x402cd2
movss xmm4, dword [0x41820c]
cvtss2sd xmm3, xmm1
cvtps2pd xmm4, xmm4
comisd xmm4, xmm3
jbe 0x402cde
or dword [esp + 0x60], 2
movsd xmm2, qword [0x410708]
cvtss2sd xmm1, xmm1
divsd xmm2, xmm1
cvtpd2ps xmm2, xmm2
mov al, byte [esp + 0x60]
test al, 4
je 0x402d9b
movsd xmm1, qword [0x4107b8]
mov esi, 0x41d090
mov ecx, 0x4560b0
lea esp, [esp]
xor eax, eax
movss xmm3, dword [ecx]
cvtps2pd xmm3, xmm3
cvtss2sd xmm4, xmm0
subsd xmm3, xmm4
cvtss2sd xmm4, xmm2
mulsd xmm3, xmm4
addsd xmm3, xmm1
cvttsd2si edx, xmm3
mov byte [eax + esi], dl
inc eax
add ecx, 4
cmp eax, 0x80
jl 0x402d02
sub esi, 0xffffff80
cmp ecx, 0x4660b0
jl 0x402d00
mov esi, 0x429598
mov ecx, 0x43daa8
xor eax, eax
jmp 0x402d50
movss xmm3, dword [ecx]
cvtps2pd xmm3, xmm3
cvtss2sd xmm4, xmm0
subsd xmm3, xmm4
cvtss2sd xmm4, xmm2
mulsd xmm3, xmm4
addsd xmm3, xmm1
cvttsd2si edx, xmm3
mov byte [esi + eax], dl
inc eax
add ecx, 4
cmp eax, 0x80
jle 0x402d50
add esi, 0x81
cmp ecx, 0x44dca8
jle 0x402d44
mov dword [esp + 0x94], 0x8111
jmp 0x402e5c
test al, 2
je 0x402e51
movsd xmm1, qword [0x4107b8]
mov ecx, 0x4560b0
mov eax, 0x44deb0
jmp 0x402dc0
mov edx, 0x80
movss xmm3, dword [ecx]
cvtps2pd xmm3, xmm3
cvtss2sd xmm4, xmm0
subsd xmm3, xmm4
cvtss2sd xmm4, xmm2
mulsd xmm3, xmm4
addsd xmm3, xmm1
cvttsd2si esi, xmm3
mov word [eax], si
add ecx, 4
add eax, 2
sub edx, 1
jne 0x402dc5
cmp eax, 0x455eb0
jl 0x402dc0
mov ecx, 0x43daa8
mov eax, 0x421390
mov edx, 0x81
jmp 0x402e10
movss xmm3, dword [ecx]
cvtps2pd xmm3, xmm3
cvtss2sd xmm4, xmm0
subsd xmm3, xmm4
cvtss2sd xmm4, xmm2
mulsd xmm3, xmm4
addsd xmm3, xmm1
cvttsd2si esi, xmm3
mov word [eax], si
add ecx, 4
add eax, 2
sub edx, 1
jne 0x402e10
cmp eax, 0x429490
jle 0x402e03
mov dword [esp + 0x94], 0x10212
jmp 0x402e5c
mov dword [esp + 0x94], 0x20414
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x24], ebp
mov dword [esp + 0x38], ebp
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x1c], ebp
mov eax, 0x455eb0
add ecx, 8
mov edi, 8
xor esi, esi
mov dword [esp + 0x20], edi
mov dword [esp + 0x28], eax
mov dword [esp + 0x44], ecx
mov eax, dword [ecx]
test eax, eax
je 0x40309d
mov edx, dword [esp + 0x40]
lea edx, [eax + edx - 0x54]
mov dword [esp + 0x74], edx
test edx, edx
je 0x40309d
mov eax, dword [edx + 0x68]
test eax, eax
je 0x402eb4
add eax, edx
jmp 0x402eb6
xor eax, eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x14], 0
test eax, eax
je 0x40309d
cmp dword [edx + 0x6c], edi
jbe 0x40309d
mov edx, dword [esp + 0x3c]
lea ecx, [eax + 0x299]
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], eax
mov dword [esp + 0x34], edi
mov edi, dword [esp + 0x20]
xor eax, eax
add edi, 0xfffffffb
cmp byte [eax + ecx - 1], 0xf
je 0x402f17
lea ebx, [esi + edx]
mov byte [eax + ebx*8 + 0x419090], 1
test byte [eax + ecx - 1], 0x80
je 0x402f13
or byte [esi + ebp + 0x421290], 0x10
inc dword [esp + 0x14]
cmp byte [eax + ecx], 0xf
je 0x402f3a
lea ebx, [esi + edx]
mov byte [eax + ebx*8 + 0x419091], 1
test byte [eax + ecx], 0x80
je 0x402f36
or byte [esi + ebp + 0x421290], 0x10
inc dword [esp + 0x14]
cmp byte [eax + ecx + 1], 0xf
je 0x402f5f
lea ebx, [esi + edx]
mov byte [eax + ebx*8 + 0x419092], 1
test byte [eax + ecx + 1], 0x80
je 0x402f5b
or byte [esi + ebp + 0x421290], 0x10
inc dword [esp + 0x14]
cmp byte [eax + ecx + 2], 0xf
je 0x402f85
mov ebx, dword [esp + 0x18]
mov byte [edi + ebx + 0x419090], 1
test byte [eax + ecx + 2], 0x80
je 0x402f81
or byte [esi + ebp + 0x421290], 0x10
inc dword [esp + 0x14]
add eax, 4
add edi, 4
cmp eax, 8
jl 0x402ef2
sub dword [esp + 0x18], 0xffffff80
add edx, 0x10
add ecx, 8
sub dword [esp + 0x34], 1
jne 0x402ee9
mov ecx, dword [esp + 0x74]
mov eax, dword [ecx + 8]
mov ecx, dword [esp + 0x28]
test al, 4
je 0x402fc8
mov edx, 1
or byte [esi + ebp + 0x421290], dl
mov word [ecx], dx
test al, 8
je 0x402fdb
mov edx, 2
or byte [esi + ebp + 0x421290], dl
mov word [ecx], dx
test al, 0x10
je 0x402fef
or byte [esi + ebp + 0x421290], 4
mov eax, 3
mov word [ecx], ax
cmp dword [esp + 0x14], 0
jne 0x403018
cmp byte [esi + ebp + 0x421290], 0
je 0x403018
push str.Wrong_liquid_detect_in_MCLQ_chunk
call dword [sym.imp.MSVCR90.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 8
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x38]
add eax, esi
shl eax, 5
add ecx, 0x1c
add eax, 0x42d6a4
mov edi, 9
fld dword [ecx - 8]
mov ebx, dword [esp + 0x20]
fstp dword [eax - 4]
add ebx, edx
fld dword [ecx]
add edx, 0x81
fstp dword [eax]
add eax, 0x204
fld dword [ecx + 8]
add ecx, 0x48
sub edi, 1
fstp dword [eax - 0x200]
fld dword [ecx - 0x38]
fstp dword [eax - 0x1fc]
fld dword [ecx - 0x30]
fstp dword [eax - 0x1f8]
fld dword [ecx - 0x28]
fstp dword [eax - 0x1f4]
fld dword [ecx - 0x20]
fstp dword [eax - 0x1f0]
fld dword [ecx - 0x18]
fstp dword [eax - 0x1ec]
fld dword [ecx - 0x10]
fstp dword [ebx*4 + 0x42d6a0]
jne 0x403036
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x28]
mov edi, 8
add edx, edi
add ecx, 0x10
add eax, 2
inc esi
cmp edx, 0x88
mov dword [esp + 0x44], ecx
mov dword [esp + 0x28], eax
mov dword [esp + 0x20], edx
jl 0x402e8b
add dword [esp + 0x1c], 0x400
sub dword [esp + 0x3c], 0xffffff80
add dword [esp + 0x38], 0x408
add dword [esp + 0x24], 0x81
add ebp, 0x10
cmp eax, 0x4560b0
jl 0x402e78
mov eax, dword [esp + 0xbc]
cmp dword [eax + 0x30], 0
je 0x4033c8
mov ecx, dword [eax + 0x30]
lea eax, [ecx + eax + 8]
mov dword [esp + 0x24], eax
test eax, eax
je 0x4033c8
mov ecx, dword [esp + 0x24]
xor eax, eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x18], eax
mov eax, 0x455eb0
add ecx, edi
nop
mov edx, dword [esp + 0x3c]
xor esi, esi
shl edx, 4
mov dword [esp + 0x14], esi
mov dword [esp + 0x20], edx
mov dword [esp + 0x38], esi
mov dword [esp + 0x1c], eax
mov dword [esp + 0x28], ecx
lea ecx, [ecx]
mov edx, dword [esp + 0x28]
cmp dword [edx + 4], 0
je 0x403388
mov eax, edx
mov eax, dword [eax]
test eax, eax
je 0x403388
mov ecx, dword [esp + 0x24]
lea esi, [eax + ecx + 8]
test esi, esi
je 0x403388
mov eax, dword [esi + 0x10]
xor edx, edx
mov dword [esp + 0x34], edx
cmp eax, edx
je 0x403195
mov ebp, dword [eax + ecx + 8]
mov eax, dword [eax + ecx + 0xc]
mov dword [esp + 0x78], eax
jmp 0x40319c
or ebp, 0xffffffff
mov dword [esp + 0x78], ebp
cmp byte [esi + 0xf], 0
mov dword [esp + 0x30], edx
jbe 0x40320e
movzx ebx, byte [esi + 0xd]
add ebx, dword [esp + 0x18]
xor edx, edx
add ebx, dword [esp + 0x30]
cmp byte [esi + 0xe], dl
jbe 0x4031fd
lea esp, [esp]
movzx ecx, byte [esi + 0xc]
add ecx, dword [esp + 0x38]
mov eax, ebp
and eax, 1
xor edi, edi
add ecx, edx
or eax, edi
je 0x4031e6
mov eax, ebx
shl eax, 7
inc dword [esp + 0x34]
mov byte [eax + ecx + 0x419090], 1
mov ecx, dword [esp + 0x78]
movzx eax, byte [esi + 0xe]
shrd ebp, ecx, 1
shr ecx, 1
inc edx
cmp edx, eax
mov dword [esp + 0x78], ecx
jl 0x4031c0
mov eax, dword [esp + 0x30]
movzx ecx, byte [esi + 0xf]
inc eax
cmp eax, ecx
mov dword [esp + 0x30], eax
jl 0x4031a6
mov eax, dword [esp + 0x1c]
mov dx, word [esi]
mov ecx, dword [0x4660b0]
mov word [eax], dx
movzx eax, word [esi]
movzx ecx, word [ecx + eax*2]
cmp ecx, 3
ja case.default.0x40322a
jmp dword [ecx*4 + 0x4038dc]
mov ecx, dword [esp + 0x20]
mov edi, dword [esp + 0x14]
or byte [ecx + edi + 0x421290], 1
jmp 0x40329b
mov ecx, dword [esp + 0x20]
mov edi, dword [esp + 0x14]
or byte [ecx + edi + 0x421290], 2
jmp 0x40329b
mov ecx, dword [esp + 0x20]
mov edi, dword [esp + 0x14]
or byte [ecx + edi + 0x421290], 4
jmp 0x40329b
mov ecx, dword [esp + 0x20]
mov edi, dword [esp + 0x14]
or byte [ecx + edi + 0x421290], 8
jmp 0x40329b
mov edi, dword [esp + 0x14]
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x48]
push edi
push edx
push ecx
push eax
push str._nCant_find_Liquid_type__u_for_map__s_nchunk__d__d_n
call dword [sym.imp.MSVCR90.dll_printf]
mov ecx, dword [esp + 0x34]
add esp, 0x14
movzx edx, word [esi]
mov eax, dword [0x4660b0]
cmp word [eax + edx*2], 1
jne 0x4032ea
movzx edx, word [esi + 2]
test dl, 1
jne 0x4032e2
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4032e2
test dl, 2
je 0x4032c9
mov edx, dword [esp + 0x24]
lea eax, [eax + edx + 8]
jmp 0x4032de
movzx edx, byte [esi + 0xe]
movzx ebx, byte [esi + 0xf]
inc edx
inc ebx
imul edx, ebx
lea eax, [eax + edx*4 + 8]
add eax, dword [esp + 0x24]
test eax, eax
jne 0x4032ea
or byte [ecx + edi + 0x421290], 0x10
cmp dword [esp + 0x34], 0
jne 0x403309
cmp byte [ecx + edi + 0x421290], 0
je 0x403309
push str.Wrong_liquid_detect_in_MH2O_chunk
call dword [sym.imp.MSVCR90.dll_printf]
add esp, 4
test byte [esi + 2], 2
jne 0x403320
mov eax, dword [esi + 0x14]
test eax, eax
je 0x403320
mov ecx, dword [esp + 0x24]
lea edi, [eax + ecx + 8]
jmp 0x403322
xor edi, edi
xor edx, edx
xor ebx, ebx
mov dword [esp + 0x44], edx
cmp byte [esi + 0xf], dl
jb 0x403388
mov ebp, dword [esp + 0x38]
movzx eax, byte [esi + 0xd]
add eax, dword [esp + 0x18]
xor ecx, ecx
add eax, edx
cmp byte [esi + 0xe], cl
jb 0x40337b
mov edx, eax
imul edx, edx, 0x81
lea esp, [esp]
movzx eax, byte [esi + 0xc]
add eax, ebp
add eax, ecx
add eax, edx
test edi, edi
je 0x403363
fld dword [edi + ebx*4]
jmp 0x403366
fld dword [esi + 4]
fstp dword [eax*4 + 0x42d6a0]
movzx eax, byte [esi + 0xe]
inc ecx
inc ebx
cmp ecx, eax
jle 0x403350
mov edx, dword [esp + 0x44]
movzx ecx, byte [esi + 0xf]
inc edx
cmp edx, ecx
mov dword [esp + 0x44], edx
jle 0x403333
mov eax, dword [esp + 0x38]
inc dword [esp + 0x14]
add dword [esp + 0x28], 0xc
add dword [esp + 0x1c], 2
add eax, 8
cmp eax, 0x80
mov dword [esp + 0x38], eax
jl 0x403150
mov eax, dword [esp + 0x1c]
inc dword [esp + 0x3c]
add dword [esp + 0x18], 8
cmp eax, 0x4560b0
mov ecx, dword [esp + 0x28]
jl 0x403130
mov dl, byte [0x421290]
xor bl, bl
xor edi, edi
xor ecx, ecx
mov esi, ecx
xor eax, eax
shl esi, 4
lea esi, [esi + 0x421290]
cmp byte [esi + eax], dl
jne 0x4033ee
inc eax
cmp eax, 0x10
jl 0x4033e1
jmp 0x4033f5
mov bl, 1
mov ecx, 0x10
inc ecx
cmp ecx, 0x10
jl 0x4033d4
mov byte [esp + 0x2f], bl
test dl, dl
jne 0x403574
test bl, bl
jne 0x403574
mov dword [esp + 0x98], edi
mov dword [esp + 0x9c], edi
mov eax, dword [esp + 0x94]
mov ecx, dword [esp + 0x90]
add eax, ecx
mov dword [esp + 0xa0], eax
push 0x200
lea edx, [esp + 0xc4]
push 0
push edx
call sub.MSVCR90.dll_memset
mov edi, dword [esp + 0x4c]
add esp, 0xc
xor bl, bl
lea eax, [esp + 0xc2]
lea ecx, [edi + 0x18]
mov dword [esp + 0x48], 0x10
mov esi, ecx
mov edx, eax
mov ecx, 4
mov eax, dword [esi - 0x10]
test eax, eax
je 0x40348f
lea eax, [eax + edi - 0x54]
test eax, eax
je 0x40348f
mov bp, word [eax + 0x44]
mov word [edx - 2], bp
test bl, bl
jne 0x40348f
cmp dword [eax + 0x44], 0
je 0x40348f
mov bl, 1
mov eax, dword [esi]
test eax, eax
je 0x4034b0
lea eax, [eax + edi - 0x54]
test eax, eax
je 0x4034b0
mov bp, word [eax + 0x44]
mov word [edx], bp
test bl, bl
jne 0x4034b0
cmp dword [eax + 0x44], 0
je 0x4034b0
mov bl, 1
mov eax, dword [esi + 0x10]
test eax, eax
je 0x4034d3
lea eax, [eax + edi - 0x54]
test eax, eax
je 0x4034d3
mov bp, word [eax + 0x44]
mov word [edx + 2], bp
test bl, bl
jne 0x4034d3
cmp dword [eax + 0x44], 0
je 0x4034d3
mov bl, 1
mov eax, dword [esi + 0x20]
test eax, eax
je 0x4034f6
lea eax, [eax + edi - 0x54]
test eax, eax
je 0x4034f6
mov bp, word [eax + 0x44]
mov word [edx + 4], bp
test bl, bl
jne 0x4034f6
cmp dword [eax + 0x44], 0
je 0x4034f6
mov bl, 1
add esi, 0x40
add edx, 8
sub ecx, 1
jne 0x40346c
sub dword [esp + 0x48], 1
mov eax, edx
mov ecx, esi
jne 0x403463
mov edi, dword [esp + 0xa8]
movzx eax, bl
neg eax
sbb eax, eax
and eax, 0x200
push 0x410734
push edi
mov dword [esp + 0xac], eax
call dword [sym.imp.MSVCR90.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
jne 0x403735
push edi
push 0x410710
call dword [sym.imp.MSVCR90.dll_printf]
add esp, 8
lea ecx, [esp + 0xac]
mov dword [esp + 0x2cc], 0xffffffff
call fcn.00401030
xor al, al
jmp 0x4038b3
movss xmm2, dword [0x4107c4]
movss xmm1, dword [0x4107c0]
movss xmm3, dword [0x418204]
mov eax, 0xff
xor edx, edx
xor ecx, ecx
xor esi, esi
mov dword [esp + 0x30], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], esi
mov dword [esp + 0x34], 0x419090
mov ebp, 0x42d6a0
xor eax, eax
mov edi, ebp
mov ebx, dword [esp + 0x34]
cmp byte [ebx + eax], 0
je 0x403606
cmp dword [esp + 0x30], eax
jle 0x4035c8
mov dword [esp + 0x30], eax
mov esi, dword [esp + 0x18]
cmp edx, eax
cmovl edx, eax
cmp dword [esp + 0x1c], esi
jle 0x4035db
mov dword [esp + 0x1c], esi
movss xmm0, dword [edi]
cmp ecx, esi
cmovl ecx, esi
cvtss2sd xmm4, xmm2
cvtps2pd xmm5, xmm0
comisd xmm5, xmm4
jbe 0x4035f4
movaps xmm2, xmm0
cvtss2sd xmm4, xmm1
cvtps2pd xmm5, xmm0
comisd xmm4, xmm5
jbe 0x40360a
movaps xmm1, xmm0
jmp 0x40360a
movss dword [edi], xmm3
inc eax
add edi, 4
cmp eax, 0x80
jl 0x4035b4
sub dword [esp + 0x34], 0xffffff80
inc esi
add ebp, 0x204
cmp ebp, 0x43d8a0
mov dword [esp + 0x18], esi
jl 0x4035b0
mov eax, dword [esp + 0x90]
mov esi, dword [esp + 0x94]
mov bl, byte [esp + 0x30]
lea edi, [esi + eax]
mov eax, dword [str.MLIQ]
mov esi, 0x10
mov dword [esp + 0x98], edi
mov dword [esp + 0x9c], esi
mov eax, dword [eax]
mov dword [esp + 0x4c], eax
xor eax, eax
mov word [esp + 0x50], ax
mov word [esp + 0x52], ax
mov al, byte [esp + 0x1c]
sub dl, bl
sub cl, al
add dl, 2
add cl, 2
cvtss2sd xmm0, xmm2
cvtss2sd xmm3, xmm1
ucomisd xmm0, xmm3
lahf
mov byte [esp + 0x54], bl
mov byte [esp + 0x55], al
mov byte [esp + 0x56], dl
mov byte [esp + 0x57], cl
movss dword [esp + 0x58], xmm1
test ah, 0x44
jp 0x4036ac
mov eax, 2
mov word [esp + 0x50], ax
cmp byte [0x418201], 0
je 0x4036d8
cvtss2sd xmm1, xmm1
cvtss2sd xmm0, xmm2
subsd xmm0, xmm1
movss xmm1, dword [0x418214]
cvtps2pd xmm1, xmm1
comisd xmm1, xmm0
jbe 0x4036d8
or word [esp + 0x50], 2
cmp byte [esp + 0x2f], 0
jne 0x4036e5
or word [esp + 0x50], 1
mov al, byte [esp + 0x50]
test al, 1
je 0x4036fc
movzx bx, byte [0x421290]
mov word [esp + 0x52], bx
jmp 0x403708
mov esi, 0x310
mov dword [esp + 0x9c], esi
test al, 2
jne 0x40371f
movzx ecx, cl
movzx edx, dl
imul ecx, edx
lea esi, [esi + ecx*4]
mov dword [esp + 0x9c], esi
test edi, edi
je 0x40341d
add esi, edi
mov dword [esp + 0xa0], esi
jmp 0x403434
mov edi, dword [sym.imp.MSVCR90.dll_fwrite]
push esi
push 1
lea ecx, [esp + 0x84]
push 0x2c
push ecx
call edi
push esi
push 1
lea edx, [esp + 0x84]
push 8
push edx
call edi
add esp, 0x20
test byte [esp + 0x70], 1
jne 0x403775
push esi
push 1
push 0x200
push 0x421090
call edi
add esp, 0x10
push esi
push 1
lea eax, [esp + 0x64]
push 0x10
push eax
call edi
mov al, byte [esp + 0x70]
add esp, 0x10
test al, 1
jne 0x4037eb
push esi
push 1
test al, 2
je 0x4037ae
push 0x8202
push 0x421390
call edi
push esi
push 1
push 0x8000
push 0x44deb0
jmp 0x4037e6
test al, 4
je 0x4037cd
push 0x4101
push 0x429598
call edi
push esi
push 1
push 0x4000
push 0x41d090
jmp 0x4037e6
push 0x10404
push 0x43daa8
call edi
push esi
push 1
push 0x10000
push 0x4560b0
call edi
add esp, 0x20
cmp dword [esp + 0x98], 0
je 0x403874
push esi
push 1
lea ecx, [esp + 0x54]
push 0x10
push ecx
call edi
add esp, 0x10
test byte [esp + 0x50], 1
jne 0x403830
push esi
push 1
push 0x200
push 0x455eb0
call edi
push esi
push 1
push 0x100
push 0x421290
call edi
add esp, 0x20
test byte [esp + 0x50], 2
jne 0x403874
xor ebp, ebp
cmp byte [esp + 0x57], 0
jbe 0x403874
movzx eax, byte [esp + 0x55]
movzx edx, byte [esp + 0x56]
movzx ecx, byte [esp + 0x54]
add eax, ebp
imul eax, eax, 0x81
push esi
push edx
add eax, ecx
lea edx, [eax*4 + 0x42d6a0]
push 4
push edx
call edi
movzx eax, byte [esp + 0x67]
inc ebp
add esp, 0x10
cmp ebp, eax
jl 0x403840
test bl, bl
je 0x403890
mov ecx, dword [esp + 0xa4]
push esi
push 1
push ecx
lea edx, [esp + 0xcc]
push edx
call edi
add esp, 0x10
push esi
call dword [sym.imp.MSVCR90.dll_fclose]
add esp, 4
lea ecx, [esp + 0xac]
mov dword [esp + 0x2cc], 0xffffffff
call fcn.00401030
mov al, 1
mov ecx, dword [esp + 0x2c4]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x2ac]
xor ecx, esp
call fcn.0040e540
add esp, 0x2bc
ret